From 81b6c5a967c7c51473e007fe44500553955c20a3 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Thu, 27 Jul 2023 00:16:11 -0700 Subject: [PATCH] Clean up conditionals in CI --- ci/run.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index e1a2fdc3..99a18cf8 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -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