Skip to content

Commit

Permalink
[rust] Build universal macOS Selenium-Manager on CI (#12455)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Aug 1, 2023
1 parent d5b37a4 commit 8d8f2ff
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build-selenium-manager.yml
@@ -1,4 +1,4 @@
name: build-selenium-manager
name: Build selenium-manager

on: workflow_dispatch

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
retention-days: 6

macos64:
name: "[macOS x64] Build selenium-manager"
name: "[macOS x64/arm64] Build selenium-manager"
runs-on: macos-latest
env:
RUSTFLAGS: '-Ctarget-feature=+crt-static'
Expand All @@ -71,18 +71,30 @@ jobs:
- name: "Update Rust"
run: |
rustup update
rustup target add aarch64-apple-darwin
rustc -vV
- name: "Build release"
- name: "Build x64"
run: |
cd rust
cargo build --release --target x86_64-apple-darwin
- name: "Build arm64"
run: |
cd rust
cargo build --release --target aarch64-apple-darwin
- name: "Build universal"
run: |
cd rust
lipo -create \
-output target/selenium-manager \
target/aarch64-apple-darwin/release/selenium-manager \
target/x86_64-apple-darwin/release/selenium-manager
- name: "Tar binary (to keep executable permission)"
run: |
cd rust/target/x86_64-apple-darwin/release
tar -cvf ../../../../selenium-manager.tar selenium-manager
cd rust/target
tar -cvf ../../selenium-manager.tar selenium-manager
- name: "Upload binary"
uses: actions/upload-artifact@v3
with:
name: selenium-manager_macos-x64
name: selenium-manager_macos-universal
path: selenium-manager.tar
retention-days: 6
retention-days: 6

0 comments on commit 8d8f2ff

Please sign in to comment.