Build Selenium Manager #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build selenium-manager | |
on: | |
workflow_dispatch: | |
inputs: | |
debug: | |
description: 'Include debug symbols in binaries' | |
required: false | |
type: boolean | |
jobs: | |
win32: | |
name: "[Windows x32] Build selenium-manager" | |
runs-on: windows-latest | |
env: | |
RUSTFLAGS: '-Ctarget-feature=+crt-static' | |
steps: | |
- name: "Checkout project" | |
uses: actions/checkout@v4 | |
- name: "Update Rust" | |
run: | | |
rustup update | |
- name: "Build release binary" | |
if: ${{ inputs.debug == false }} | |
run: | | |
rustup toolchain install stable-i686-pc-windows-msvc | |
rustup default stable-i686-pc-windows-msvc | |
rustc -vV | |
cd rust | |
cargo build --release | |
- name: "Upload release binary" | |
if: ${{ inputs.debug == false }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_windows-x32 | |
path: rust/target/release/selenium-manager.exe | |
retention-days: 6 | |
- name: "Build debug binary" | |
if: ${{ inputs.debug == true }} | |
run: | | |
rustup toolchain install stable-i686-pc-windows-gnu | |
rustup default stable-i686-pc-windows-gnu | |
rustc -vV | |
cd rust | |
cargo build --profile dev | |
- name: "Upload debug binary" | |
if: ${{ inputs.debug == true }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_windows-x32-debug | |
path: rust/target/debug/selenium-manager.exe | |
retention-days: 6 | |
linux64: | |
name: "[Linux x64] Build selenium-manager" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout project" | |
uses: actions/checkout@v4 | |
- name: "Update Rust" | |
run: | | |
rustup update | |
rustc -vV | |
- name: "Install cross" | |
run: | | |
cargo install cross --git https://github.com/cross-rs/cross | |
cross -V | |
- name: "Build release binary" | |
if: ${{ inputs.debug == false }} | |
run: | | |
cd rust | |
cross build --target x86_64-unknown-linux-musl --release | |
cd target/x86_64-unknown-linux-musl/release | |
tar -cvf ../../../../selenium-manager.tar selenium-manager | |
- name: "Upload release binary" | |
if: ${{ inputs.debug == false }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_linux-x64 | |
path: selenium-manager.tar | |
retention-days: 6 | |
- name: "Build debug binary" | |
if: ${{ inputs.debug == true }} | |
run: | | |
cd rust | |
cross build --target x86_64-unknown-linux-musl --profile dev | |
cd target/x86_64-unknown-linux-musl/debug | |
tar -cvf ../../../../selenium-manager.tar selenium-manager | |
- name: "Upload debug binary" | |
if: ${{ inputs.debug == true }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_linux-x64-debug | |
path: selenium-manager.tar | |
retention-days: 6 | |
macos64: | |
name: "[macOS x64/arm64] Build selenium-manager" | |
runs-on: macos-latest | |
env: | |
RUSTFLAGS: '-Ctarget-feature=+crt-static' | |
steps: | |
- name: "Checkout project" | |
uses: actions/checkout@v4 | |
- name: "Update Rust" | |
run: | | |
rustup update | |
rustup target add aarch64-apple-darwin | |
rustc -vV | |
- name: "Build release binary" | |
if: ${{ inputs.debug == false }} | |
run: | | |
cd rust | |
cargo build --target x86_64-apple-darwin --release | |
cargo build --target aarch64-apple-darwin --release | |
lipo -create -output target/selenium-manager \ | |
target/aarch64-apple-darwin/release/selenium-manager \ | |
target/x86_64-apple-darwin/release/selenium-manager | |
cd target | |
tar -cvf ../../selenium-manager.tar selenium-manager | |
- name: "Upload release binary" | |
if: ${{ inputs.debug == false }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_macos-universal | |
path: selenium-manager.tar | |
retention-days: 6 | |
- name: "Build debug binary" | |
if: ${{ inputs.debug == true }} | |
run: | | |
cd rust | |
cargo build --target x86_64-apple-darwin --profile dev | |
cargo build --target aarch64-apple-darwin --profile dev | |
lipo -create -output target/selenium-manager \ | |
target/aarch64-apple-darwin/debug/selenium-manager \ | |
target/x86_64-apple-darwin/debug/selenium-manager | |
cd target | |
tar -cvf ../../selenium-manager.tar selenium-manager | |
- name: "Upload debug binary" | |
if: ${{ inputs.debug == true }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: selenium-manager_macos-universal-debug | |
path: selenium-manager.tar | |
retention-days: 6 |