Skip to content

Commit

Permalink
ci: Install cargo-hack in Cirrus CI
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 16, 2024
1 parent 362dc9a commit 3b8e8a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ aarch64_linux_test_task:
- lscpu
- rustup toolchain add nightly --no-self-update && rustup default nightly
# - apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends moreutils
- curl --proto '=https' --tlsv1.2 -fsSL "https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${TARGET}.tar.gz" | tar xzf - -C "${HOME}/.cargo/bin"
test_script:
- set -CeEuxo pipefail
- ./tools/test.sh -vv
Expand All @@ -44,6 +45,7 @@ aarch64_linux_valgrind_task:
- set -CeEuxo pipefail
- rustup toolchain add nightly --no-self-update && rustup default nightly
- apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends valgrind # moreutils
- curl --proto '=https' --tlsv1.2 -fsSL "https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${TARGET}.tar.gz" | tar xzf - -C "${HOME}/.cargo/bin"
test_script:
- set -CeEuxo pipefail
- ./tools/test.sh valgrind -vv
Expand Down
3 changes: 3 additions & 0 deletions tools/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ if [[ -n "${target}" ]]; then
fi
if type -P cargo-hack >/dev/null; then
args+=(--features "${test_features}" --ignore-unknown-features)
elif [[ -n "${CI:-}" ]]; then
bail "cargo-hack is required"
else
echo "warning: cargo-hack is required to run full tests"
args+=(--features "${test_features}")
fi
case "${cmd}" in
Expand Down

0 comments on commit 3b8e8a5

Please sign in to comment.