-
Notifications
You must be signed in to change notification settings - Fork 76
75 lines (68 loc) · 2.29 KB
/
build-binaries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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: macos-latest
package-suffix: macos-amd64
- os: windows-latest
package-suffix: windows-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
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# actions/setup-python doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
uses: actions/setup-python@v4
with:
python-version: "3.11"
- if: ${{ matrix.os == 'ubuntu-arm' }}
uses: deadsnakes/[email protected]
with:
python-version: "3.11"
# 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: actions-rs/toolchain@v1
with:
toolchain: stable
- if: ${{ runner.os != 'Linux' }}
uses: Swatinem/rust-cache@v1
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 -E opentelemetry
# 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@v2
with:
name: packages-${{ matrix.package-suffix }}
path: dist