Skip to content

Commit 65e8c65

Browse files
committed
Add release logic for Linux arm64 binaries
1 parent 1855709 commit 65e8c65

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

.github/workflows/ci-rust.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,28 @@ jobs:
120120
- name: "Install cross"
121121
run: |
122122
cargo install cross --git https://github.com/cross-rs/cross
123-
- name: "Build release binary"
123+
- name: "Build release binary (x64)"
124124
run: cross build --target x86_64-unknown-linux-musl --release
125125
working-directory: rust
126+
- name: "Build release binary (arm64)"
127+
run: cross build --target aarch64-unknown-linux-musl --release
128+
working-directory: rust
126129
- name: "Rename binary"
127-
run: mv rust/target/x86_64-unknown-linux-musl/release/selenium-manager selenium-manager-linux
130+
run: |
131+
mv rust/target/x86_64-unknown-linux-musl/release/selenium-manager selenium-manager-linux
132+
mv rust/target/aarch64-unknown-linux-musl/release/selenium-manager selenium-manager-linux-arm64
128133
- name: "Upload release binary"
129134
uses: actions/upload-artifact@v4
130135
with:
131136
name: selenium-manager-linux
132137
path: selenium-manager-linux
133138
retention-days: 6
139+
- name: "Upload release binary"
140+
uses: actions/upload-artifact@v4
141+
with:
142+
name: selenium-manager-linux-arm64
143+
path: selenium-manager-linux-arm64
144+
retention-days: 6
134145

135146
linux-debug:
136147
name: "Linux Debug"
@@ -149,18 +160,30 @@ jobs:
149160
- name: "Install cross"
150161
run: |
151162
cargo install cross --git https://github.com/cross-rs/cross
152-
- name: "Build release binary"
163+
- name: "Build release binary (x64)"
153164
run: |
154165
cross build --target x86_64-unknown-linux-musl --profile dev
155166
cd target/x86_64-unknown-linux-musl/debug
156167
tar -cvf ../../../../selenium-manager-linux-debug.tar selenium-manager
157168
working-directory: rust
169+
- name: "Build release binary (arm64)"
170+
run: |
171+
cross build --target aarch64-unknown-linux-musl --profile dev
172+
cd target/aarch64-unknown-linux-musl/debug
173+
tar -cvf ../../../../selenium-manager-linux-arm64-debug.tar selenium-manager
174+
working-directory: rust
158175
- name: "Upload release binary"
159176
uses: actions/upload-artifact@v4
160177
with:
161178
name: selenium-manager-linux-debug
162179
path: selenium-manager-linux-debug.tar
163180
retention-days: 6
181+
- name: "Upload release binary"
182+
uses: actions/upload-artifact@v4
183+
with:
184+
name: selenium-manager-linux-arm64-debug
185+
path: selenium-manager-linux-arm64-debug.tar
186+
retention-days: 6
164187

165188
macos-stable:
166189
name: "MacOS Stable"
@@ -246,9 +269,10 @@ jobs:
246269
- name: "Prepare and Commit"
247270
run: |
248271
linux_sha=$(shasum -a 256 artifacts/selenium-manager-linux/selenium-manager-linux | awk '{print $1}')
272+
linux_arm64_sha=$(shasum -a 256 artifacts/selenium-manager-linux-arm64/selenium-manager-linux-arm64 | awk '{print $1}')
249273
macos_sha=$(shasum -a 256 artifacts/selenium-manager-macos/selenium-manager-macos | awk '{print $1}')
250274
windows_sha=$(shasum -a 256 artifacts/selenium-manager-windows/selenium-manager-windows.exe | awk '{print $1}')
251-
echo "{\"macos\": \"$macos_sha\", \"windows\": \"$windows_sha\", \"linux\": \"$linux_sha\"}" > latest.json
275+
echo "{\"macos\": \"$macos_sha\", \"windows\": \"$windows_sha\", \"linux\": \"$linux_sha\", \"linux-arm64\": \"$linux_arm64_sha\" }" > latest.json
252276
git config --local user.email "[email protected]"
253277
git config --local user.name "Selenium CI Bot"
254278
git add latest.json
@@ -267,6 +291,7 @@ jobs:
267291
prerelease: false
268292
files: |
269293
artifacts/selenium-manager-linux/selenium-manager-linux
294+
artifacts/selenium-manager-linux-arm64/selenium-manager-linux-arm64
270295
artifacts/selenium-manager-macos/selenium-manager-macos
271296
artifacts/selenium-manager-windows/selenium-manager-windows.exe
272297
artifacts/selenium-manager-linux-debug/selenium-manager-linux-debug.tar

0 commit comments

Comments
 (0)