Skip to content

Build wheels

Build wheels #32

Workflow file for this run

name: Build wheels
on:
workflow_dispatch:
inputs:
build_type:
type: choice
required: true
description: 'Build Type'
default: 'Release'
options:
- 'Release'
- 'Debug'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-build:
name: Linux build
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.
# FIXME: there is no guarantee that this CUDA-Q image aligns with the CUDA-Q
# commit that we are trying to align with.
container: ghcr.io/nvidia/cuda-quantum-devdeps:manylinux-${{ matrix.platform }}-${{ matrix.toolchain.id }}-main
permissions:
actions: write
contents: read
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.11', '3.12']
platform: ['amd64', 'arm64']
toolchain:
- id: cu12.0-gcc11
cc: gcc-11
cxx: g++-11
build-type: Release
steps:
- name: Get code
uses: actions/checkout@v4
with:
set-safe-directory: true
- name: Get required CUDAQ version
id: get-cudaq-version
uses: ./.github/actions/get-cudaq-version
- name: Get CUDAQ code
uses: actions/checkout@v4
with:
repository: ${{ steps.get-cudaq-version.outputs.repo }}
ref: ${{ steps.get-cudaq-version.outputs.ref }}
path: cudaq
set-safe-directory: true
- name: Build CUDAQ toolchain
run: |
.github/workflows/scripts/build_cudaq.sh
- name: Build wheels
run: |
.github/workflows/scripts/build_wheels.sh \
--cudaq-prefix $HOME/.cudaq \
--build-type ${{ inputs.build_type }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheels-py${{ matrix.python }}-${{ matrix.platform }}
path: /wheels/**