test_workflow_hello #290
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 Binaries | |
on: | |
push: | |
branches: | |
- main | |
- maturin | |
- "releases/*" | |
jobs: | |
# Compile the binaries and upload artifacts | |
compile-binaries: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
package-suffix: linux-amd64 | |
- os: ubuntu-arm | |
package-suffix: linux-aarch64 | |
runsOn: ubuntu-24.04-arm64-2-core | |
- os: macos-intel | |
package-suffix: macos-amd64 | |
runsOn: macos-13 | |
- 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 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
# 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: | |
workspaces: temporalio/bridge -> target | |
- uses: astral-sh/setup-uv@v5 | |
- run: uv sync --all-extras | |
# Add the source dist only for Linux x64 for now | |
- if: ${{ matrix.package-suffix == 'linux-amd64' }} | |
run: uv build --sdist | |
# Build the wheel | |
- run: uv run cibuildwheel --output-dir dist | |
# Install the wheel in a new venv and run a test | |
- name: Test wheel | |
shell: bash | |
run: | | |
mkdir __test_wheel__ | |
cd __test_wheel__ | |
cp -r ../tests . | |
python -m venv .test-venv | |
./.test-venv/bin/pip install 'protobuf>=3.20' 'types-protobuf>=3.20' 'typing-extensions<5,>=4.2.0' pytest pytest_asyncio grpcio pydantic opentelemetry-api opentelemetry-sdk python-dateutil | |
./.test-venv/bin/pip install --no-index --find-links=../dist temporalio | |
./.test-venv/bin/python -m pytest -s -k test_workflow_hello | |
# Upload dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: packages-${{ matrix.package-suffix }} | |
path: dist |