think2 #124
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: Library Release Build | |
on: | |
push: | |
branches: | |
- release-library/** | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
linux: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
build-arch: | |
- x86_64 | |
- aarch64 | |
name: Python Linux ${{ matrix.build-arch }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- if: matrix.build-arch == 'aarch64' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build in Docker | |
run: scripts/docker-manylinux.sh | |
env: | |
TARGET: ${{ matrix.build-arch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
path: py/dist/* | |
macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-apple-darwin | |
py-platform: macosx-10_15_x86_64 | |
- target: aarch64-apple-darwin | |
py-platform: macosx-11_0_arm64 | |
name: Python macOS ${{ matrix.py-platform }} | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Rust Toolchain | |
run: | | |
rustup set profile minimal | |
rustup toolchain install stable | |
rustup override set stable | |
rustup target add --toolchain stable ${{ matrix.target }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Build Wheel | |
run: | | |
pip install wheel | |
python setup.py bdist_wheel -p ${{ matrix.py-platform }} | |
working-directory: py | |
env: | |
# consumed by cargo and setup.py to obtain the target dir | |
CARGO_BUILD_TARGET: ${{ matrix.target }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
path: py/dist/* | |
sdist: | |
name: Python sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Build sdist | |
run: python setup.py sdist --format=zip | |
working-directory: py | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
path: py/dist/* |