diff options
author | David Robertson <davidr@element.io> | 2022-10-03 14:19:51 +0100 |
---|---|---|
committer | David Robertson <davidr@element.io> | 2022-10-03 14:19:51 +0100 |
commit | f8b9d0b6dd9203fe11e9140c946c495897628aad (patch) | |
tree | b4ee153287b812a0a003f0c7781604c356a840ae | |
parent | Change dependabot CL suffix (#14011) (diff) | |
download | synapse-f8b9d0b6dd9203fe11e9140c946c495897628aad.tar.xz |
WIP: build aarch64 wheels on release branches
-rw-r--r-- | .github/workflows/release-artifacts.yml | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 0708d631cd..70b22c1fcb 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -94,29 +94,55 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, macos-10.15] + # 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/') }} + include: + - os: ubuntu-20.04 + emulate_aarch64: false + - os: ubuntu-20.04 + emulate_aarch64: true + - os: macos-10.15 + emulate_aarch64: false exclude: # Don't build macos wheels on PR CI. - is_pr: true os: "macos-10.15" + # Don't build ARM linux wheels on PR CI either. + - 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: |