This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
Wheels #65
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: Wheels | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
continue-on-error: true | |
runs-on: ${{ matrix.OS }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- OS: ubuntu-20.04 | |
ARCH: x86_64 | |
- OS: windows-2019 | |
ARCH: AMD64 | |
- OS: macos-12 | |
ARCH: x86_64 | |
- OS: macos-12 | |
ARCH: arm64 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: gcc | |
vcvarsall: ${{ contains(matrix.os, 'windows') }} | |
msvc: ${{ contains(matrix.os, 'windows') }} | |
cmake: true | |
ninja: true | |
# build | |
- name: cibuildwheel python bindings | |
run: | | |
pip install cibuildwheel | |
cibuildwheel --output-dir wheelhouse | |
# done | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
path: wheelhouse/*.whl | |
name: build_artifact_python_bindings | |
build-linux-aarch64: | |
continue-on-error: true | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install cross-compilation toolchain | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y binutils-aarch64-linux-gnu \ | |
g++-aarch64-linux-gnu gcc-aarch64-linux-gnu | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: aarch64 | |
# build | |
- name: cibuildwheel python bindings aarch64 | |
run: | | |
pip install cibuildwheel | |
cibuildwheel --output-dir wheelhouse | |
# done | |
- name: Upload wheels | |
if: github.event_name != 'pull_request' && github.ref_name == 'main' | |
uses: actions/upload-artifact@v3 | |
with: | |
path: wheelhouse/*.whl | |
name: build_artifact_python_bindings | |
upload_bindings_wheels: | |
if: github.event_name != 'pull_request' && github.ref_name == 'main' | |
needs: [build, build-linux-aarch64] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
# unpacks default artifact into dist/ | |
# if `name: artifact` is omitted, the action will create extra parent dir | |
name: build_artifact_python_bindings | |
path: dist | |
- name: Release current commit | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
artifacts: "dist/*.whl" | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
tag: "latest" | |
name: "latest" | |
removeArtifacts: false | |
allowUpdates: true | |
replacesArtifacts: true | |
makeLatest: true |