Bump cudaq ref. #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR workflow | |
on: | |
push: | |
branches: | |
- "pull-request/[0-9]+" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-changes: | |
name: Check changes | |
runs-on: ubuntu-latest | |
outputs: | |
build-cudaq: ${{ steps.filter.outputs.build-cudaq }} | |
build-all: ${{ steps.filter.outputs.build-all }} | |
build-qec: ${{ steps.filter.outputs.build-qec }} | |
build-solvers: ${{ steps.filter.outputs.build-solvers }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
set-safe-directory: true | |
- name: Lookup PR info | |
id: get-pr-info | |
env: | |
GH_TOKEN: ${{ github.token }} | |
uses: nv-gha-runners/get-pr-info@main | |
- name: Check what needs testing | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
base: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.sha }} | |
filters: | | |
build-cudaq: | |
- '.github/workflows/cudaq_bump.yml' | |
- '.github/actions/get-cudaq-build/**' | |
- '.cudaq_version' | |
build-all: | |
- '.github/actions/build-lib/action.yaml' | |
- '.github/actions/build-lib/build_all.yaml' | |
- '.github/workflows/all_libs.yaml' | |
- 'cmake/Modules/**' | |
- '**/CMakeLists.txt' | |
build-qec: | |
- '.github/actions/build-lib/action.yaml' | |
- '.github/actions/build-lib/build_qec.sh' | |
- '.github/workflows/lib_qec.yaml' | |
- 'cmake/Modules/**' | |
- 'libs/core/**.cpp' | |
- 'libs/core/**.h' | |
- 'libs/core/**/CMakeLists.txt' | |
- '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/**/CMakeLists.txt' | |
- 'libs/solvers/**.cpp' | |
- 'libs/solvers/**.h' | |
- 'libs/solvers/**.in' | |
- 'libs/solvers/**.py' | |
- 'libs/solvers/**/CMakeLists.txt' | |
build-cudaq: | |
name: Build CUDAQ | |
needs: [check-changes] | |
if: needs.check-changes.outputs.build-cudaq == 'true' | |
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && 'linux-amd64-cpu32' || 'ubuntu-latest' }} | |
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main | |
permissions: | |
actions: write | |
contents: read | |
pull-requests: read | |
steps: | |
- name: Get code | |
uses: actions/checkout@v4 | |
with: | |
set-safe-directory: true | |
- name: Lookup PR info | |
id: get-pr-info | |
env: | |
GH_TOKEN: ${{ github.token }} | |
uses: nv-gha-runners/get-pr-info@main | |
- name: Get required CUDAQ version | |
id: get-cudaq-version | |
uses: ./.github/actions/get-cudaq-version | |
- name: Get CUDAQ build | |
uses: ./.github/actions/get-cudaq-build | |
with: | |
repo: ${{ steps.get-cudaq-version.outputs.repo }} | |
ref: ${{ steps.get-cudaq-version.outputs.ref }} | |
token: ${{ secrets.CUDAQ_ACCESS_TOKEN }} | |
pr-number: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).number }} | |
save-build: true | |
save-ccache: false | |
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' | |
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' | |
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' | |
uses: ./.github/workflows/lib_solvers.yaml | |