-
Notifications
You must be signed in to change notification settings - Fork 22
64 lines (53 loc) · 1.67 KB
/
wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) 2023 Zero ASIC Corporation
# This code is licensed under Apache License 2.0 (see LICENSE for details)
name: Wheels Build
on:
workflow_dispatch:
push:
branches:
- main
# Ensure C compilation works on MacOS.
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
jobs:
build_wheels:
name: Wheels on ${{ matrix.platform.os }} ${{ matrix.platform.arch}} ${{ matrix.python-version }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
python-version: [cp37*, cp38*, cp39*, cp310*, cp311*]
platform:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-latest
arch: aarch64
- os: macos-latest
arch: universal
env:
CIBW_ARCHS_LINUX: ${{ matrix.platform.arch }}
steps:
- uses: actions/checkout@v3
# This facilitates building Linux+arm64 wheels
# https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD: ${{ matrix.python-version }}
CIBW_SKIP: "pp* *win32 *i686 *-musllinux_*"
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_TEST_SKIP: "*_arm64"
# "if: always()" ensures that we always upload any wheels that have
# been created, even if cibuildwheel action fails
- name: Upload wheels
if: always()
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
name: switchboard
# TODO: 'publish' job once we determine pypi name.