Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ jobs:
key: ${{ inputs.cache-name }}-
restore-keys: ${{ inputs.cache-name }}-
- name: Remove driver directories Windows
if: inputs.os == 'windows'
if: contains(inputs.os, 'windows')
run: |
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: inputs.os != 'windows'
if: "!contains(inputs.os, 'windows')"
run: |
sudo rm -rf "$CHROMEWEBDRIVER" "$EDGEWEBDRIVER" "$GECKOWEBDRIVER"
- name: Set Python version
Expand All @@ -163,7 +163,7 @@ jobs:
bazelisk-cache: true
bazelrc: common --color=yes
# Workaround for long path issues: https://github.com/bazelbuild/bazel/pull/22532
output-base: ${{ inputs.os == 'windows' && 'D://b' || '' }}
output-base: ${{ inputs.os == 'windows-11-arm' && 'C://b' || (startsWith(inputs.os, 'windows') && 'D://b' || '') }}
cache-version: 2
disk-cache: false
external-cache: |
Expand Down Expand Up @@ -210,10 +210,10 @@ jobs:
fluxbox -display :99 &
echo "DISPLAY=:99" >> "$GITHUB_ENV"
- name: Set resolution
if: inputs.os == 'windows' && inputs.browser != ''
if: contains(inputs.os, 'windows') && inputs.browser != ''
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Disable 8dot3 short names
if: inputs.os == 'windows'
if: contains(inputs.os, 'windows')
run: fsutil 8dot3name set 0
- name: Setup Safari
if: inputs.browser == 'safari'
Expand Down
56 changes: 41 additions & 15 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- os: macos
- os: ubuntu
- os: windows
- os: windows-11-arm
Comment thread
cgoldberg marked this conversation as resolved.
with:
name: Tests (${{ matrix.os }})
os: ${{ matrix.os }}
Expand All @@ -58,20 +59,31 @@ jobs:
- name: "Update Rust"
run: |
rustup update
rustup toolchain install stable-i686-pc-windows-msvc
rustup default stable-i686-pc-windows-msvc
rustup target install i686-pc-windows-msvc
rustup target install aarch64-pc-windows-msvc
rustc -vV
- name: "Build release binary"
run: cargo build --release
- name: "Build release binary (x86)"
run: cargo build --target i686-pc-windows-msvc --release
working-directory: rust
- name: "Rename binary"
run: mv rust/target/release/selenium-manager.exe selenium-manager-windows.exe
- name: "Upload release binary"
- name: "Build release binary (arm64)"
run: cargo build --target aarch64-pc-windows-msvc --release
working-directory: rust
- name: "Rename binary (x86)"
run: mv rust/target/i686-pc-windows-msvc/release/selenium-manager.exe selenium-manager-windows.exe
- name: "Rename binary (arm64)"
run: mv rust/target/aarch64-pc-windows-msvc/release/selenium-manager.exe selenium-manager-windows-arm64.exe
- name: "Upload release binary (x86)"
uses: actions/upload-artifact@v5
with:
name: selenium-manager-windows
path: selenium-manager-windows.exe
retention-days: 6
- name: "Upload release binary (arm64)"
uses: actions/upload-artifact@v5
with:
name: selenium-manager-windows-arm64
path: selenium-manager-windows-arm64.exe
retention-days: 6

windows-debug:
name: "Windows Debug"
Expand All @@ -88,20 +100,31 @@ jobs:
- name: "Update Rust"
run: |
rustup update
rustup toolchain install stable-i686-pc-windows-msvc
rustup default stable-i686-pc-windows-msvc
rustup target install i686-pc-windows-msvc
rustup target install aarch64-pc-windows-msvc
rustc -vV
- name: "Build release binary"
run: cargo build --profile dev
- name: "Build release binary (x86)"
run: cargo build --target i686-pc-windows-msvc --profile dev
working-directory: rust
- name: "Rename binary"
run: mv rust/target/debug/selenium-manager.exe selenium-manager-windows-debug.exe
- name: "Upload release binary"
- name: "Build release binary (arm64)"
run: cargo build --target aarch64-pc-windows-msvc --profile dev
working-directory: rust
- name: "Rename binary (x86)"
run: mv rust/target/i686-pc-windows-msvc/debug/selenium-manager.exe selenium-manager-windows-debug.exe
- name: "Rename binary (arm64)"
run: mv rust/target/aarch64-pc-windows-msvc/debug/selenium-manager.exe selenium-manager-windows-arm64-debug.exe
- name: "Upload release binary (x86)"
uses: actions/upload-artifact@v5
with:
name: selenium-manager-windows-debug
path: selenium-manager-windows-debug.exe
retention-days: 6
- name: "Upload release binary (arm64)"
uses: actions/upload-artifact@v5
with:
name: selenium-manager-windows-arm64-debug
path: selenium-manager-windows-arm64-debug.exe
retention-days: 6

linux-stable:
name: "Linux Stable"
Expand Down Expand Up @@ -250,7 +273,8 @@ jobs:
linux_sha=$(shasum -a 256 artifacts/selenium-manager-linux/selenium-manager-linux | awk '{print $1}')
macos_sha=$(shasum -a 256 artifacts/selenium-manager-macos/selenium-manager-macos | awk '{print $1}')
windows_sha=$(shasum -a 256 artifacts/selenium-manager-windows/selenium-manager-windows.exe | awk '{print $1}')
echo "{\"macos\": \"$macos_sha\", \"windows\": \"$windows_sha\", \"linux\": \"$linux_sha\"}" > latest.json
windows_arm64_sha=$(shasum -a 256 artifacts/selenium-manager-windows/selenium-manager-windows-arm64.exe | awk '{print $1}')
echo "{\"macos\": \"$macos_sha\", \"windows\": \"$windows_sha\", \"windows-arm64\": \"$windows_arm64_sha\", \"linux\": \"$linux_sha\"}" > latest.json
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
git add latest.json
Expand All @@ -271,6 +295,8 @@ jobs:
artifacts/selenium-manager-linux/selenium-manager-linux
artifacts/selenium-manager-macos/selenium-manager-macos
artifacts/selenium-manager-windows/selenium-manager-windows.exe
artifacts/selenium-manager-windows-arm64/selenium-manager-windows-arm64.exe
artifacts/selenium-manager-linux-debug/selenium-manager-linux-debug.tar
artifacts/selenium-manager-macos-debug/selenium-manager-macos-debug.tar
artifacts/selenium-manager-windows-debug/selenium-manager-windows-debug.exe
artifacts/selenium-manager-windows-arm64-debug/selenium-manager-windows-arm64-debug.exe
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,14 @@ crate.from_cargo(
cargo_lockfile = "//rust:Cargo.lock",
lockfile = "//rust:Cargo.Bazel.lock",
manifests = ["//rust:Cargo.toml"],
supported_platform_triples = [
"aarch64-apple-darwin",
"aarch64-pc-windows-msvc",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
],
Comment on lines +378 to +385
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value here is ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown", "wasm32-wasip1", "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu"], so I had to explicitly add aarch64-pc-windows-msvc, otherwise Bazel would happily skip the build and tests on Windows arm64. That caused the tests to "succeed" in CI, but in reality they were just skipped. Docs: https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html#from_cargo

)
use_repo(crate, "crates")

Expand Down
Loading