Skip to content

Commit

Permalink
Update CI for arm64 build
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Howe <[email protected]>
  • Loading branch information
bmhowe23 committed Jan 14, 2025
1 parent 85b51ca commit 5ed3035
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/actions/build-lib/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
description: 'Indicates whether to save the compilation cache'
default: 'false'
required: false
platform:
description: 'Platform (amd64 or arm64)'
default: ''
required: true
outputs:
build-dir:
description: 'Build dir.'
Expand All @@ -32,7 +36,7 @@ runs:
- name: Compilation cache key
id: ccache-key
run: |
echo "main=ccache-${{ inputs.lib }}-cu12.0-gcc11" >> $GITHUB_OUTPUT
echo "main=ccache-${{ inputs.lib }}-cu12.0-gcc11-${{ inputs.platform }}" >> $GITHUB_OUTPUT
if [[ -n "${{ inputs.pr-number }}" ]]; then
echo "pr=-pr${{ inputs.pr-number }}" >> $GITHUB_OUTPUT
fi
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/get-cudaq-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ inputs:
description: 'Check if a cache entry exists without downloading the cache'
default: 'false'
required: false
platform:
description: 'Platform (amd64 or arm64)'
default: ''
required: true
outputs:
found-cache:
description: 'A boolean value to indicate that a cache entry was found.'
Expand All @@ -49,7 +53,7 @@ runs:
.cudaq_version
run: |
hash=${{ hashFiles(format('{0}', env.to_hash)) }}
echo "main=cudaq-${{ inputs.ref }}-$hash" >> $GITHUB_OUTPUT
echo "main=cudaq-${{ matrix.platform }}-${{ inputs.ref }}-$hash" >> $GITHUB_OUTPUT
if [[ -n "${{ inputs.pr-number }}" ]]; then
echo "pr=-pr${{ inputs.pr-number }}" >> $GITHUB_OUTPUT
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/all_libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ jobs:
pr-build:
name: Build and test
if: startsWith(github.ref, 'refs/heads/pull-request/')
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && 'linux-amd64-cpu8' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform: ['amd64', 'arm64']
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && format('linux-{0}-cpu8', matrix.platform) || 'ubuntu-latest' }}
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main
permissions:
actions: write
Expand Down Expand Up @@ -61,6 +65,7 @@ jobs:
lib: "all"
pr-number: ${{ steps.export-pr-info.outputs.pr_number }}
save-ccache: true
platform: ${{ matrix.platform }}

# ========================================================================
# Run tests
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cudaq_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ concurrency:
jobs:
build-cudaq:
name: Build CUDAQ
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && 'linux-amd64-cpu32' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform: ['amd64', 'arm64']
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && format('linux-{0}-cpu32', matrix.platform) || 'ubuntu-latest' }}
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main
permissions:
actions: write
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lib_qec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ jobs:
pr-build:
name: Build and test
if: startsWith(github.ref, 'refs/heads/pull-request/')
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && 'linux-amd64-cpu8' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform: ['amd64', 'arm64']
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && format('linux-{0}-cpu8', matrix.platform) || 'ubuntu-latest' }}
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main
permissions:
actions: write
Expand Down Expand Up @@ -57,6 +61,7 @@ jobs:
lib: "qec"
pr-number: ${{ steps.export-pr-info.outputs.pr_number }}
save-ccache: true
platform: ${{ matrix.platform }}

# ========================================================================
# Run tests
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lib_solvers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ jobs:
pr-build:
name: Build and test
if: startsWith(github.ref, 'refs/heads/pull-request/')
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && 'linux-amd64-cpu8' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform: ['amd64', 'arm64']
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && format('linux-{0}-cpu8', matrix.platform) || 'ubuntu-latest' }}
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main
permissions:
actions: write
Expand Down Expand Up @@ -61,6 +65,7 @@ jobs:
lib: "solvers"
pr-number: ${{ steps.export-pr-info.outputs.pr_number }}
save-ccache: true
platform: ${{ matrix.platform }}

# ========================================================================
# Run tests
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ jobs:
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' }}
strategy:
fail-fast: false
matrix:
platform: ['amd64', 'arm64']
runs-on: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && format('linux-{0}-cpu32', matrix.platform) || 'ubuntu-latest' }}
container: ghcr.io/nvidia/cuda-quantum-devdeps:ext-cu12.0-gcc11-main
permissions:
actions: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: "Sync with upstream repository"
jobs:
sync:
name: Get Updates from Upstream
if: ${{ github.repository != 'NVIDIA/cudaqx' }}
if: ${{ startsWith(github.repository, 'NVIDIA/cudaqx') && github.repository != 'NVIDIA/cudaqx' }}
runs-on: 'ubuntu-latest'

steps:
Expand Down

0 comments on commit 5ed3035

Please sign in to comment.