Skip to content

Commit

Permalink
Clean up conditionals in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jul 27, 2023
1 parent d78a80b commit 81b6c5a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,22 @@ cargo_test() {

cargo_test_impl() {
ORIGINAL_RUSTFLAGS=${RUSTFLAGS}
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v16 --cfg test_v32 --cfg test_v64" cargo_test ${@}
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v128 --cfg test_v256" cargo_test ${@}
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v512" cargo_test ${@}
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v16 --cfg test_v32 --cfg test_v64" cargo_test "${@}"
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v128 --cfg test_v256" cargo_test "${@}"
RUSTFLAGS="${ORIGINAL_RUSTFLAGS} --cfg test_v512" cargo_test "${@}"
RUSTFLAGS=${ORIGINAL_RUSTFLAGS}
}

# Debug run:
if [[ "${TARGET}" != "wasm32-unknown-unknown" ]] &&
[[ ! "${TARGET}" =~ "aarch64" ]] &&
[[ "${TARGET}" != "armv7-linux-androideabi" ]] &&
[[ "${TARGET}" != "thumbv7neon-linux-androideabi" ]]; then
release_only=false
if [[ "${TARGET}" == "wasm32-unknown-unknown" ]]; then
release_only=true
else if [[ "${TARGET}" =~ "aarch64" ]]; then
release_only=true
else if [[ "${TARGET}" =~ "androideabi" ]]; then
release_only=true
fi

if [[ "$release_only" == false ]]; then
# Run wasm32-unknown-unknown, aarch64, and android in release mode only
# as for some reason the emulation quality of these is low
cargo_test_impl
Expand Down

0 comments on commit 81b6c5a

Please sign in to comment.