Skip to content

Commit 76c5ba1

Browse files
committed
split macos x86_64, aarch64 into separate steps so they can run in parallel
1 parent 24db285 commit 76c5ba1

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

.github/workflows/release-cli.yml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ jobs:
160160
name: jcg-aarch64-pc-windows-msvc
161161
path: jcg-aarch64-pc-windows-msvc.zip
162162

163-
# macOS (x86_64 + aarch64)
164-
build-macos:
165-
name: Build (macOS)
163+
build-macos-x86_64:
164+
name: Build (macOS x86_64)
166165
runs-on: macos-latest
167166
steps:
168167
- name: Checkout
@@ -173,34 +172,49 @@ jobs:
173172
with:
174173
toolchain: stable
175174

176-
- name: Add macOS targets
177-
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin
175+
- name: Add x86_64 target
176+
run: rustup target add x86_64-apple-darwin
178177

179178
- name: Build x86_64-apple-darwin
180179
run: cargo build --package jsoncodegen-cli --profile cli --target x86_64-apple-darwin
181180

182-
- name: Build aarch64-apple-darwin
183-
run: cargo build --package jsoncodegen-cli --profile cli --target aarch64-apple-darwin
184-
185-
- name: Rename x86_64 Binary
181+
- name: Rename Binary
186182
run: mv target/x86_64-apple-darwin/cli/jcg jcg-x86_64-apple-darwin
187183

188-
- name: Rename aarch64 Binary
189-
run: mv target/aarch64-apple-darwin/cli/jcg jcg-aarch64-apple-darwin
190-
191-
- name: Zip x86_64 Binary
184+
- name: Zip Binary
192185
run: zip jcg-x86_64-apple-darwin.zip jcg-x86_64-apple-darwin
193186

194-
- name: Zip aarch64 Binary
195-
run: zip jcg-aarch64-apple-darwin.zip jcg-aarch64-apple-darwin
196-
197-
- name: Upload x86_64 macOS artifact
187+
- name: Upload artifact
198188
uses: actions/upload-artifact@v4
199189
with:
200190
name: jcg-x86_64-apple-darwin
201191
path: jcg-x86_64-apple-darwin.zip
202192

203-
- name: Upload aarch64 macOS artifact
193+
build-macos-arm64:
194+
name: Build (macOS ARM64)
195+
runs-on: macos-latest
196+
steps:
197+
- name: Checkout
198+
uses: actions/checkout@v4
199+
200+
- name: Install Rust
201+
uses: actions-rs/toolchain@v1
202+
with:
203+
toolchain: stable
204+
205+
- name: Add ARM64 target
206+
run: rustup target add aarch64-apple-darwin
207+
208+
- name: Build aarch64-apple-darwin
209+
run: cargo build --package jsoncodegen-cli --profile cli --target aarch64-apple-darwin
210+
211+
- name: Rename Binary
212+
run: mv target/aarch64-apple-darwin/cli/jcg jcg-aarch64-apple-darwin
213+
214+
- name: Zip Binary
215+
run: zip jcg-aarch64-apple-darwin.zip jcg-aarch64-apple-darwin
216+
217+
- name: Upload artifact
204218
uses: actions/upload-artifact@v4
205219
with:
206220
name: jcg-aarch64-apple-darwin
@@ -214,7 +228,8 @@ jobs:
214228
- build-windows-x86_64
215229
- build-windows-i686
216230
- build-windows-arm64
217-
- build-macos
231+
- build-macos-x86_64
232+
- build-macos-arm64
218233
runs-on: ubuntu-latest
219234
permissions:
220235
contents: write

0 commit comments

Comments
 (0)