@@ -77,38 +77,76 @@ jobs:
77
77
# Compile the binaries and upload artifacts
78
78
compile-binaries :
79
79
strategy :
80
- fail-fast : true
80
+ fail-fast : false
81
81
matrix :
82
82
include :
83
83
- os : ubuntu-latest
84
84
package-suffix : linux-amd64
85
+ ci-arch : auto
86
+ - os : ubuntu-latest
87
+ package-suffix : linux-aarch64
88
+ ci-arch : aarch64
85
89
- os : macos-latest
86
90
package-suffix : macos-amd64
91
+ ci-arch : auto
92
+ - os : macos-latest
93
+ package-suffix : macos-arm64
94
+ ci-arch : arm64
95
+ rust-add-target : aarch64-apple-darwin
87
96
- os : windows-latest
88
97
package-suffix : windows-amd64
98
+ ci-arch : auto
89
99
runs-on : ${{ matrix.os }}
100
+ continue-on-error : true
90
101
steps :
91
102
- uses : actions/checkout@v2
92
103
with :
93
104
submodules : recursive
94
- - uses : actions-rs/toolchain@v1
105
+ - uses : actions/setup-python@v1
106
+ with :
107
+ python-version : " 3.10"
108
+
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
95
114
with :
96
115
toolchain : stable
97
- - uses : Swatinem/rust-cache@v1
116
+ target : ${{ matrix.rust-add-target }}
117
+ - if : ${{ runner.os != 'Linux' }}
118
+ uses : Swatinem/rust-cache@v1
98
119
with :
99
120
working-directory : temporalio/bridge
100
- - uses : actions/setup-python@v1
101
- with :
102
- python-version : " 3.10"
103
- # Needed for tests since they use external server
104
- - uses : actions/setup-go@v2
121
+
122
+ # Need QEMU for ARM build on Linux
123
+ - if : ${{ matrix.package-suffix == 'linux-aarch64' }}
124
+ uses : docker/setup-qemu-action@v1
105
125
with :
106
- go-version : " 1.18"
126
+ image : tonistiigi/binfmt:latest
127
+ platforms : arm64
128
+
129
+ # Prepare
107
130
- run : python -m pip install --upgrade wheel poetry poethepoet
108
131
- run : poetry install --no-root
109
- - run : poetry build
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 }}
110
139
- run : poe fix-wheel
111
- - run : poe test-dist-single
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
112
150
- uses : actions/upload-artifact@v2
113
151
with :
114
152
name : packages-${{ matrix.package-suffix }}
0 commit comments