diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 0708d631cd36..07766f0e79ee 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -95,6 +95,9 @@ jobs: strategy: matrix: os: [ubuntu-20.04, macos-10.15] + emulate_aarch64: [false, true] + # is_pr is a flag used to exclude certain jobs from the matrix on PRs. + # It is not read by the rest of the workflow. is_pr: - ${{ startsWith(github.ref, 'refs/pull/') }} @@ -102,21 +105,42 @@ jobs: # Don't build macos wheels on PR CI. - is_pr: true os: "macos-10.15" + # Don't build aarch64 wheels on mac. + - os: "macos-10.15" + emulate_aarch64: true + # Don't build aarch64 wheels on PR CI. + - is_pr: true + emulate_aarch64: true steps: + - name: Debug + run: echo '${{ toJSON(matrix) }}' + - uses: actions/checkout@v3 - uses: actions/setup-python@v3 + - name: Set up QEMU to emulate arm64 + if: matrix.emulate_aarch64 + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.9.0 poetry==1.2.0 # Only build a single wheel in CI. - - name: Set env vars. + - name: "Env: build single wheel for CI" run: | echo "CIBW_BUILD="cp37-manylinux_x86_64"" >> $GITHUB_ENV if: startsWith(github.ref, 'refs/pull/') + # Only build a single wheel in CI. + - name: "Env: build aarch64 wheels" + run: | + echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV + if: matrix.emulate_aarch64 + - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fe61930a55a..0bfc01fdb297 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: Tests on: push: branches: ["develop", "release-*"] - pull_request: +# pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/changelog.d/14016.misc b/changelog.d/14016.misc new file mode 100644 index 000000000000..76082a80f926 --- /dev/null +++ b/changelog.d/14016.misc @@ -0,0 +1 @@ +Build wheels for ARM (aarch64) on release branches.