Skip to content

Commit 7713c4e

Browse files
authored
Enable qemu emulation and aarch64 build for prophet (#2254)
1 parent 9869a3b commit 7713c4e

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/wheel.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ env:
1111

1212
jobs:
1313
make-wheels:
14-
name: Make ${{ matrix.os }} wheels
14+
name: Make ${{ matrix.os }} ${{ matrix.cibw_arch }} ${{ matrix.py_version }} wheels
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
1818
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
19+
cibw_arch: ["native", "aarch64"]
20+
py_version: ["cp37-*", "cp38-*", "cp39-*", "cp310-*"]
21+
exclude:
22+
- os: macos-latest
23+
cibw_arch: "aarch64"
24+
- os: windows-latest
25+
cibw_arch: "aarch64"
1926
fail-fast: false
2027

2128
steps:
@@ -30,6 +37,12 @@ jobs:
3037
path: C:/rtools40
3138
key: ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1
3239

40+
- name: Set up QEMU
41+
if: matrix.cibw_arch == 'aarch64'
42+
uses: docker/setup-qemu-action@v2
43+
with:
44+
platforms: arm64
45+
3346
- name: "Build wheels"
3447
uses: pypa/[email protected]
3548
with:
@@ -38,17 +51,17 @@ jobs:
3851
CIBW_ENVIRONMENT: >
3952
STAN_BACKEND="${{ env.STAN_BACKEND }}"
4053
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
41-
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
54+
CIBW_BUILD: ${{ matrix.py_version }}
4255
CIBW_SKIP: "*musllinux*"
43-
CIBW_ARCHS: native
56+
CIBW_ARCHS: ${{ matrix.cibw_arch }}
4457
CIBW_BUILD_FRONTEND: build
4558
CIBW_TEST_REQUIRES: pytest
4659
CIBW_TEST_COMMAND: pytest --pyargs prophet
4760

4861
- name: "Upload wheel as artifact"
4962
uses: actions/upload-artifact@v3
5063
with:
51-
name: artifact-${{ matrix.os }}-wheel
64+
name: artifact-${{ matrix.os }}-${{ matrix.cibw_arch }}-wheel
5265
path: "./**/*.whl"
5366

5467
make-sdist:

0 commit comments

Comments
 (0)