fix wheels #15
Workflow file for this run
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
name: Build | |
on: | |
push: {} | |
pull_request: {} | |
release: | |
types: [published] | |
jobs: | |
build_wheels: | |
name: Build ${{ matrix.pyver }}-wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
pyver: [cp38, cp39, cp310, cp311] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: set up rust | |
run: > | |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && | |
rustup show | |
- run: | | |
rustup target add aarch64-apple-darwin | |
rustup target add x86_64-apple-darwin | |
if: matrix.os == 'macos-latest' | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.12.3 | |
env: | |
CIBW_ARCHS_MACOS: "arm64 universal2" | |
CIBW_ARCHS_LINUX: "auto64" | |
CIBW_BUILD: ${{matrix.pyver}}-* | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"' | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
upload_all: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/*.whl |