Skip to content

Commit

Permalink
Update CI tests to use local cross build.
Browse files Browse the repository at this point in the history
Simplifies testing CI locally, without modifying the system
installation.
  • Loading branch information
Alexhuszagh committed Jun 29, 2022
1 parent 00fe87b commit 60326c9
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 60326c9

Please sign in to comment.