Skip to content

Commit 7631f75

Browse files
committed
ci: Pin the Cross binary to avoid breaking the CI
Signed-off-by: Joe Richey <[email protected]>
1 parent 8191d7f commit 7631f75

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

utils/ci/install.sh

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
set -ex
44

55
main() {
6-
local target=
6+
local host=
77
if [ $TRAVIS_OS_NAME = linux ]; then
8-
target=x86_64-unknown-linux-musl
9-
sort=sort
8+
host=x86_64-unknown-linux-musl
109
else
11-
target=x86_64-apple-darwin
12-
sort=gsort # for `sort --sort-version`, from brew's coreutils.
10+
host=x86_64-apple-darwin
1311
fi
1412

1513
# Builds for iOS are done on OSX, but require the specific target to be
@@ -32,18 +30,12 @@ main() {
3230
;;
3331
esac
3432

35-
# This fetches latest stable release
36-
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
37-
| cut -d/ -f3 \
38-
| grep -E '^v[0.1.0-9.]+$' \
39-
| $sort --version-sort \
40-
| tail -n1)
41-
curl -LSfs https://japaric.github.io/trust/install.sh | \
42-
sh -s -- \
43-
--force \
44-
--git japaric/cross \
45-
--tag $tag \
46-
--target $target
33+
# Pin the Cross version to avoid breaking the CI
34+
local cross_version="v0.2.0"
35+
wget -O cross.tar.gz https://github.com/rust-embedded/cross/releases/download/${cross_version}/cross-${cross_version}-${host}.tar.gz
36+
tar -xzf cross.tar.gz
37+
rm -f cross.tar.gz
38+
mv ./cross $HOME/.cargo/bin
4739
}
4840

4941
main

0 commit comments

Comments
 (0)