Skip to content

Commit

Permalink
[ci] Fixes to PR and PR cleanup workflows.
Browse files Browse the repository at this point in the history
* Fix paths that triggers different library testing jobs.
* Fix condition to run library testing jobs.
* There is no need to install GitHub CLI tool on github runners.

Signed-off-by: boschmitt <[email protected]>
  • Loading branch information
boschmitt committed Nov 22, 2024
1 parent 5a9919c commit 08143e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pr_cache_cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
bash .github/workflows/scripts/install_git_cli.sh
pr_number=$(echo ${{ github.event.ref }} | sed 's/.*\///')
# Fetch the list of cache keys
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/pr_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ jobs:
- '.github/actions/build-lib/build_qec.sh'
- '.github/workflows/lib_qec.yaml'
- 'cmake/Modules/**'
- 'libs/core/**.cpp'
- 'libs/core/**.h'
- 'libs/core/**/*.cpp'
- 'libs/core/**/*.h'
- 'libs/core/**/CMakeLists.txt'
- 'libs/qec/**.cpp'
- 'libs/qec/**.h'
- 'libs/qec/**.in'
- 'libs/qec/**.py'
- 'libs/qec/**/*.cpp'
- 'libs/qec/**/*.h'
- 'libs/qec/**/*.in'
- 'libs/qec/**/*.py'
- 'libs/qec/**/CMakeLists.txt'
build-solvers:
- '.github/actions/build-lib/action.yaml'
- '.github/actions/build-lib/build_solvers.sh'
- '.github/workflows/lib_solvers.yaml'
- 'cmake/Modules/**'
- 'libs/core/**.cpp'
- 'libs/core/**.h'
- 'libs/core/**/*.cpp'
- 'libs/core/**/*.h'
- 'libs/core/**/CMakeLists.txt'
- 'libs/solvers/**.cpp'
- 'libs/solvers/**.h'
- 'libs/solvers/**.in'
- 'libs/solvers/**.py'
- 'libs/solvers/**/*.cpp'
- 'libs/solvers/**/*.h'
- 'libs/solvers/**/*.in'
- 'libs/solvers/**/*.py'
- 'libs/solvers/**/CMakeLists.txt'
build-cudaq:
Expand Down Expand Up @@ -109,21 +109,24 @@ jobs:
save-build: true
save-ccache: false

# In the following, we need the `always()` fucntion in order to guarantee
# that these jobs will run when their conditions are met, even if the
# `build-cudaq` job is skipped.
build-all:
name: All libs
needs: [check-changes, build-cudaq]
if: needs.check-changes.outputs.build-all == 'true' || needs.check-changes.outputs.build-cudaq == 'true'
if: always() && (needs.check-changes.outputs.build-all == 'true' || needs.check-changes.outputs.build-cudaq == 'true')
uses: ./.github/workflows/all_libs.yaml

build-qec:
name: QEC
needs: [check-changes, build-cudaq]
if: needs.check-changes.outputs.build-qec == 'true' || needs.check-changes.outputs.build-cudaq == 'true'
if: always() && (needs.check-changes.outputs.build-qec == 'true' || needs.check-changes.outputs.build-cudaq == 'true')
uses: ./.github/workflows/lib_qec.yaml

build-solvers:
name: Solvers
needs: [check-changes, build-cudaq]
if: needs.check-changes.outputs.build-solvers == 'true' || needs.check-changes.outputs.build-cudaq == 'true'
if: always() && (needs.check-changes.outputs.build-solvers == 'true' || needs.check-changes.outputs.build-cudaq == 'true')
uses: ./.github/workflows/lib_solvers.yaml

0 comments on commit 08143e4

Please sign in to comment.