Skip to content

Commit 8d8f2ff

Browse files
authored
[rust] Build universal macOS Selenium-Manager on CI (#12455)
1 parent d5b37a4 commit 8d8f2ff

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/build-selenium-manager.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-selenium-manager
1+
name: Build selenium-manager
22

33
on: workflow_dispatch
44

@@ -61,7 +61,7 @@ jobs:
6161
retention-days: 6
6262

6363
macos64:
64-
name: "[macOS x64] Build selenium-manager"
64+
name: "[macOS x64/arm64] Build selenium-manager"
6565
runs-on: macos-latest
6666
env:
6767
RUSTFLAGS: '-Ctarget-feature=+crt-static'
@@ -71,18 +71,30 @@ jobs:
7171
- name: "Update Rust"
7272
run: |
7373
rustup update
74+
rustup target add aarch64-apple-darwin
7475
rustc -vV
75-
- name: "Build release"
76+
- name: "Build x64"
7677
run: |
7778
cd rust
7879
cargo build --release --target x86_64-apple-darwin
80+
- name: "Build arm64"
81+
run: |
82+
cd rust
83+
cargo build --release --target aarch64-apple-darwin
84+
- name: "Build universal"
85+
run: |
86+
cd rust
87+
lipo -create \
88+
-output target/selenium-manager \
89+
target/aarch64-apple-darwin/release/selenium-manager \
90+
target/x86_64-apple-darwin/release/selenium-manager
7991
- name: "Tar binary (to keep executable permission)"
8092
run: |
81-
cd rust/target/x86_64-apple-darwin/release
82-
tar -cvf ../../../../selenium-manager.tar selenium-manager
93+
cd rust/target
94+
tar -cvf ../../selenium-manager.tar selenium-manager
8395
- name: "Upload binary"
8496
uses: actions/upload-artifact@v3
8597
with:
86-
name: selenium-manager_macos-x64
98+
name: selenium-manager_macos-universal
8799
path: selenium-manager.tar
88-
retention-days: 6
100+
retention-days: 6

0 commit comments

Comments
 (0)