Bump GitHub Actions (#545) #171
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 Binaries | |
on: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
jobs: | |
# Compile the binaries and upload artifacts | |
compile-binaries: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: ubuntu-latest | |
package-suffix: linux-amd64 | |
- os: ubuntu-arm | |
package-suffix: linux-aarch64 | |
# Need the 8 CPU version that has 12GB of RAM, the 4 CPU version | |
# only has 6 GB. | |
runsOn: buildjet-8vcpu-ubuntu-2204-arm | |
- os: macos-intel | |
package-suffix: macos-amd64 | |
runsOn: macos-12 | |
- os: macos-arm | |
package-suffix: macos-aarch64 | |
runsOn: macos-14 | |
- os: windows-latest | |
package-suffix: windows-amd64 | |
runs-on: ${{ matrix.runsOn || matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# actions/setup-python doesn't yet support Linux ARM | |
- if: ${{ matrix.os != 'ubuntu-arm' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- if: ${{ matrix.os == 'ubuntu-arm' }} | |
uses: deadsnakes/[email protected] | |
with: | |
python-version: "3.12" | |
# Install Rust locally for non-Linux (Linux uses an internal docker | |
# command to build with cibuildwheel which uses rustup install defined | |
# in pyproject.toml) | |
- if: ${{ runner.os != 'Linux' }} | |
uses: dtolnay/rust-toolchain@stable | |
- if: ${{ runner.os != 'Linux' }} | |
uses: Swatinem/rust-cache@v2 | |
with: | |
working-directory: temporalio/bridge | |
# Prepare | |
# Using fixed Poetry version until | |
# https://github.com/python-poetry/poetry/issues/7611 and | |
# https://github.com/python-poetry/poetry/pull/7694 are fixed | |
- run: python -m pip install --upgrade wheel "poetry==1.3.2" poethepoet | |
- run: poetry install --no-root --all-extras | |
# Add the source dist only for Linux x64 for now | |
- if: ${{ matrix.package-suffix == 'linux-amd64' }} | |
run: poetry build --format sdist | |
# Build and fix the wheel | |
- run: poetry run cibuildwheel --output-dir dist | |
- run: poe fix-wheel | |
# Simple test | |
- run: poe test-dist-single | |
# Upload dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: packages-${{ matrix.package-suffix }} | |
path: dist |