Skip to content

Commit

Permalink
Merge #881
Browse files Browse the repository at this point in the history
881: Update CI tests to use local cross build. r=Emilgardis a=Alexhuszagh

Simplifies testing CI locally, without modifying the system installation.

Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
  • Loading branch information
bors[bot] and Alexhuszagh authored Jun 29, 2022
2 parents 6c2226d + 60326c9 commit e594054
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ set -euo pipefail
# installed version on macOS. likewise, "${var[@]}" is an unbound
# error if var is an empty array.

ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
project_home=$(dirname "${ci_dir}")

function retry {
local tries="${TRIES-5}"
local timeout="${TIMEOUT-1}"
Expand Down Expand Up @@ -41,15 +45,15 @@ main() {
local td=

retry cargo fetch
cargo install --force --path . --debug
cargo build

# Unset RUSTFLAGS
export RUSTFLAGS=""

export QEMU_STRACE=1

# ensure we have the proper toolchain and optional rust flags
export CROSS=(cross)
export CROSS=("${project_home}/target/debug/cross")
export CROSS_FLAGS=""
if (( ${BUILD_STD:-0} )); then
# use build-std instead of xargo, due to xargo being
Expand Down

0 comments on commit e594054

Please sign in to comment.