Skip to content

Commit

Permalink
ci: Unpin nightly for MIPS test
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 10, 2023
1 parent 25f2e41 commit ec71c70
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ jobs:
target: i686-unknown-linux-gnu
- rust: nightly
target: i686-unknown-linux-gnu
- rust: nightly-2023-07-04 # TODO: LLVM bug: Undefined temporary symbol error when building std.
- rust: nightly
target: mips-unknown-linux-gnu
- rust: nightly-2021-12-16 # Rust 1.59, LLVM 13 (oldest version we can use asm_experimental_arch on this target)
target: mips-unknown-linux-gnu
- rust: nightly-2023-07-04 # TODO: LLVM bug: Undefined temporary symbol error when building std.
- rust: nightly
target: mipsel-unknown-linux-gnu
- rust: nightly-2021-12-16 # Rust 1.59, LLVM 13 (oldest version we can use asm_experimental_arch on this target)
target: mipsel-unknown-linux-gnu
Expand Down Expand Up @@ -239,6 +239,10 @@ jobs:
if: startsWith(matrix.target, 's390x')

- run: cargo minimal-versions build -vvv --workspace --all-features --ignore-private $TARGET $BUILD_STD
# TODO: LLVM bug: Undefined temporary symbol error when building std.
if: matrix.target != 'mips-unknown-linux-gnu' && matrix.target != 'mipsel-unknown-linux-gnu'
- run: cargo minimal-versions build -vvv --release --workspace --all-features --ignore-private $TARGET $BUILD_STD
if: matrix.target == 'mips-unknown-linux-gnu' || matrix.target == 'mipsel-unknown-linux-gnu'

build:
needs: tidy
Expand Down
22 changes: 15 additions & 7 deletions tools/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ case "${1:-}" in
esac
target=''
build_std=''
release=()
tests=()
cargo_options=()
rest_cargo_options=()
Expand All @@ -78,6 +79,7 @@ while [[ $# -gt 0 ]]; do
cargo_options+=("$1")
build_std=1
;;
--release) release=(--release) ;;
*) cargo_options+=("$1") ;;
esac
shift
Expand Down Expand Up @@ -144,11 +146,15 @@ target_lower="${target//-/_}"
target_lower="${target_lower//./_}"
target_upper="$(tr '[:lower:]' '[:upper:]' <<<"${target_lower}")"
randomize_layout=' -Z randomize-layout'
case "${target}" in
# TODO: LLVM bug: Undefined temporary symbol error when building std.
mips-unknown-linux-gnu | mipsel-unknown-linux-gnu) release=(--release) ;;
esac

case "${cmd}" in
build)
TS=''
args+=(--no-run)
args+=(--no-run ${release[@]+"${release[@]}"})
x_cargo test ${cargo_options[@]+"${cargo_options[@]}"} "${args[@]}" >&2
binary_path=$(
"${cargo}" ${pre_args[@]+"${pre_args[@]}"} test ${cargo_options[@]+"${cargo_options[@]}"} "${args[@]}" -q --message-format=json \
Expand All @@ -171,11 +177,13 @@ case "${cmd}" in
esac

run() {
if [[ "${RUSTFLAGS:-}" == *"-Z sanitizer="* ]] || [[ "${RUSTFLAGS:-}" == *"-Zsanitizer="* ]]; then
# doctest with debug build on Sanitizer is slow
x_cargo test --tests "$@"
else
x_cargo test ${tests[@]+"${tests[@]}"} "$@"
if [[ ${#release[@]} -eq 0 ]]; then
if [[ "${RUSTFLAGS:-}" == *"-Z sanitizer="* ]] || [[ "${RUSTFLAGS:-}" == *"-Zsanitizer="* ]]; then
# doctest with debug build on Sanitizer is slow
x_cargo test --tests "$@"
else
x_cargo test ${tests[@]+"${tests[@]}"} "$@"
fi
fi

# release mode + doctests is slow on some platforms (probably related to the fact that they compile binaries for each example)
Expand All @@ -201,7 +209,7 @@ run() {
fi
RUSTFLAGS="${RUSTFLAGS:-}${randomize_layout}" \
RUSTDOCFLAGS="${RUSTDOCFLAGS:-}${randomize_layout}" \
x_cargo careful test ${tests[@]+"${tests[@]}"} --target-dir target/careful "$@"
x_cargo careful test ${release[@]+"${release[@]}"} ${tests[@]+"${tests[@]}"} --target-dir target/careful "$@"
fi
}

Expand Down

0 comments on commit ec71c70

Please sign in to comment.