@@ -77,15 +77,12 @@ jobs:
77
77
# Compile the binaries and upload artifacts
78
78
compile-binaries :
79
79
strategy :
80
- fail-fast : false
80
+ fail-fast : true
81
81
matrix :
82
82
include :
83
83
- os : ubuntu-latest
84
84
package-suffix : linux-amd64
85
85
ci-arch : auto
86
- - os : ubuntu-latest
87
- package-suffix : linux-aarch64
88
- ci-arch : aarch64
89
86
- os : macos-latest
90
87
package-suffix : macos-amd64
91
88
ci-arch : auto
@@ -96,59 +93,21 @@ jobs:
96
93
- os : windows-latest
97
94
package-suffix : windows-amd64
98
95
ci-arch : auto
99
- runs-on : ${{ matrix.os }}
100
- continue-on-error : true
101
- steps :
102
- - uses : actions/checkout@v2
103
- with :
104
- submodules : recursive
105
- - uses : actions/setup-python@v1
106
- with :
107
- python-version : " 3.10"
96
+ uses : ./.github/workflows/compile-binary.yml
97
+ with :
98
+ os : ${{ matrix.os }}
99
+ package-suffix : ${{ matrix.package-suffix }}
100
+ ci-arch : ${{ matrix.ci-arch }}
101
+ rust-add-target : ${{ matrix.rust-add-target }}
108
102
109
- # Install Rust locally for non-Linux (Linux uses an internal docker
110
- # command to build with cibuildwheel which uses rustup install defined
111
- # in pyproject.toml)
112
- - if : ${{ runner.os != 'Linux' }}
113
- uses : actions-rs/toolchain@v1
114
- with :
115
- toolchain : stable
116
- target : ${{ matrix.rust-add-target }}
117
- - if : ${{ runner.os != 'Linux' }}
118
- uses : Swatinem/rust-cache@v1
119
- with :
120
- working-directory : temporalio/bridge
121
-
122
- # Need QEMU for ARM build on Linux
123
- - if : ${{ matrix.package-suffix == 'linux-aarch64' }}
124
- uses : docker/setup-qemu-action@v1
125
- with :
126
- image : tonistiigi/binfmt:latest
127
- platforms : arm64
128
-
129
- # Prepare
130
- - run : python -m pip install --upgrade wheel poetry poethepoet
131
- - run : poetry install --no-root
132
-
133
- # Add the source dist only for Linux x64 for now
134
- - if : ${{ matrix.package-suffix == 'linux-amd64' }}
135
- run : poetry build --format sdist
136
-
137
- # Build and fix the wheel
138
- - run : poetry run cibuildwheel --output-dir dist --arch ${{ matrix.ci-arch }}
139
- - run : poe fix-wheel
140
-
141
- # Do test only for ci-arch auto (i.e. local machine)
142
- - if : ${{ matrix.ci-arch == 'auto' }}
143
- uses : actions/setup-go@v2
144
- with :
145
- go-version : " 1.18"
146
- - if : ${{ matrix.ci-arch == 'auto' }}
147
- run : poe test-dist-single
148
-
149
- # Upload dist
150
- - uses : actions/upload-artifact@v2
151
- with :
152
- name : packages-${{ matrix.package-suffix }}
153
- path : dist
103
+ # We separate out Linux aarch64 because it is too slow to build every PR, so
104
+ # we only build on push. When we have a ARM Linux runner or invest the time
105
+ # into not using QEMU, we may move back.
106
+ compile-binaries-linux-aarch64 :
107
+ if : ${{ github.event_name != 'pull_request' }}
108
+ uses : ./.github/workflows/compile-binary.yml
109
+ with :
110
+ os : ubuntu-latest
111
+ package-suffix : linux-aarch64
112
+ ci-arch : aarch64
154
113
0 commit comments