Skip to content

Commit

Permalink
Update conditional logic
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Howe <[email protected]>
  • Loading branch information
bmhowe23 committed Jan 18, 2025
1 parent 2aefae0 commit 5309859
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build_wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ concurrency:
jobs:
build-cudaqx-wheels:
name: Build CUDA-QX wheels
if: ${{ !inputs.artifacts_from_run }}
runs-on: linux-${{ matrix.platform }}-cpu8
# CUDAQ requires a highly specialized environment to build. Thus, it is much
# easier to rely on their's devdeps images to do the building.
Expand All @@ -45,18 +46,15 @@ jobs:

steps:
- name: Get code
if: ${{ !inputs.artifacts_from_run }}
uses: actions/checkout@v4
with:
set-safe-directory: true

- name: Get required CUDAQ version
if: ${{ !inputs.artifacts_from_run }}
id: get-cudaq-version
uses: ./.github/actions/get-cudaq-version

- name: Get CUDAQ code
if: ${{ !inputs.artifacts_from_run }}
uses: actions/checkout@v4
with:
repository: ${{ steps.get-cudaq-version.outputs.repo }}
Expand All @@ -65,20 +63,17 @@ jobs:
set-safe-directory: true

- name: Build CUDAQ toolchain
if: ${{ !inputs.artifacts_from_run }}
run: |
.github/workflows/scripts/build_cudaq.sh ${{ matrix.python }}
- name: Build wheels
if: ${{ !inputs.artifacts_from_run }}
run: |
.github/workflows/scripts/build_wheels.sh \
--cudaq-prefix $HOME/.cudaq \
--build-type ${{ inputs.build_type }} \
--python-version ${{ matrix.python }}
- name: Upload artifact
if: ${{ !inputs.artifacts_from_run }}
uses: actions/upload-artifact@v4
with:
name: wheels-py${{ matrix.python }}-${{ matrix.platform }}
Expand All @@ -88,6 +83,7 @@ jobs:
# this is a separate job.
build-cudaq-wheels:
name: Build CUDA-Q wheels
if: ${{ !inputs.artifacts_from_run }}
strategy:
fail-fast: false
matrix:
Expand All @@ -99,18 +95,15 @@ jobs:
pull-requests: read
steps:
- name: Get code
if: ${{ !inputs.artifacts_from_run }}
uses: actions/checkout@v4
with:
set-safe-directory: true

- name: Get required CUDAQ version
if: ${{ !inputs.artifacts_from_run }}
id: get-cudaq-version
uses: ./.github/actions/get-cudaq-version

- name: Get CUDAQ wheels
if: ${{ !inputs.artifacts_from_run }}
uses: ./.github/actions/get-cudaq-wheels
with:
repo: ${{ steps.get-cudaq-version.outputs.repo }}
Expand All @@ -120,7 +113,6 @@ jobs:
platform: ${{ matrix.platform }}

- name: Upload CUDAQ wheels
if: ${{ !inputs.artifacts_from_run }}
uses: actions/upload-artifact@v4
with:
name: cudaq-wheels-${{ matrix.platform }}
Expand All @@ -131,6 +123,7 @@ jobs:
test-cudaqx-wheels:
name: Test CUDA-QX wheels (CPU)
needs: [build-cudaqx-wheels, build-cudaq-wheels]
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
runs-on: linux-${{ matrix.platform }}-cpu4
container: ubuntu:22.04
permissions:
Expand Down Expand Up @@ -182,6 +175,7 @@ jobs:
test-wheels-gpu:
name: Test CUDA-QX wheels (GPU)
needs: [build-cudaqx-wheels, build-cudaq-wheels]
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
runs-on: linux-${{ matrix.runner.arch }}-gpu-${{ matrix.runner.gpu }}-latest-1
container:
image: nvidia/cuda:12.0.0-base-ubuntu22.04
Expand Down

0 comments on commit 5309859

Please sign in to comment.