Skip to content

Commit

Permalink
Use latest version of cross-rs from git
Browse files Browse the repository at this point in the history
Works around cross-rs/cross#1453
  • Loading branch information
Amanieu committed Mar 7, 2024
1 parent bf1afbc commit 56f6c0b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ set -ex

: "${TARGET?The TARGET environment variable must be set.}"

CARGO=cargo
if [ "${CROSS}" = "1" ]; then
export CARGO_NET_RETRY=5
export CARGO_NET_TIMEOUT=10

# Temporary workaround for https://github.com/cross-rs/cross/issues/1453
cargo install cross --git https://github.com/cross-rs/cross
#cargo install --locked cross
CARGO=cross
fi

if [ "${NO_STD}" = "1" ]; then
# Unfortunately serde currently doesn't work without std due to a cargo bug.
FEATURES="rustc-internal-api"
Expand All @@ -12,20 +23,12 @@ else
FEATURES="rustc-internal-api,serde,rayon,raw"
OP="test"
fi

if [ "${CHANNEL}" = "nightly" ]; then
FEATURES="${FEATURES},nightly"
export RUSTFLAGS="$RUSTFLAGS -D warnings"
fi

CARGO=cargo
if [ "${CROSS}" = "1" ]; then
export CARGO_NET_RETRY=5
export CARGO_NET_TIMEOUT=10

cargo install --locked cross
CARGO=cross
fi

# Make sure we can compile without the default hasher
"${CARGO}" -vv build --target="${TARGET}" --no-default-features
"${CARGO}" -vv build --target="${TARGET}" --release --no-default-features
Expand Down

0 comments on commit 56f6c0b

Please sign in to comment.