mirror of
https://github.com/element-hq/synapse
synced 2024-09-12 07:05:12 +00:00
WIP: build aarch64 wheels on release branches
This commit is contained in:
parent
061739d10f
commit
f8b9d0b6dd
1 changed files with 28 additions and 2 deletions
30
.github/workflows/release-artifacts.yml
vendored
30
.github/workflows/release-artifacts.yml
vendored
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue