add license + copyright header #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |