Skip to content

Commit b926926

Browse files
committed
Try to use cargo binstall
1 parent 76c758e commit b926926

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v4
19+
- name: Install cargo-binstall
20+
uses: cargo-bins/cargo-binstall@main
1921
- name: prebuild
2022
run: ./prebuild
2123
- name: presubmit

prebuild

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ sudo apt-get install --yes \
1515
library/download_test_roms
1616

1717
if ! which wasm-bindgen; then
18-
cargo install wasm-bindgen-cli
18+
if which cargo-binstall; then
19+
cargo binstall wasm-bindgen-cli
20+
elif
21+
cargo install wasm-bindgen-cli
22+
fi
1923
fi
2024

2125
if ! which wasm-opt; then
22-
cargo install wasm-opt
26+
if which cargo-binstall; then
27+
cargo binstall wasm-opt
28+
elif
29+
cargo install wasm-opt
30+
fi
2331
fi

0 commit comments

Comments
 (0)