| @@ -16,6 +16,16 @@ louise() { cargo run --quiet -p louise -- "$@"; } |
| 16 | 16 | asan=(LOUISE_LIB_DIR="$PWD/target/sanitize/debug" LOUISE_CC=clang |
| 17 | 17 | LOUISE_CFLAGS="-O1 -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer") |
| 18 | 18 | |
| 19 | +# The tests compile every tests/run program several times over: with the |
| 20 | +# compiler optimised, much faster than with a debug one. Debug assertions |
| 21 | +# and overflow checks stay on. |
| 22 | +export CARGO_PROFILE_DEV_OPT_LEVEL="${CARGO_PROFILE_DEV_OPT_LEVEL:-1}" |
| 23 | +# The quick lane (LOUISE_CI_FULL=0, which ci.yml sets for pull requests) |
| 24 | +# leaves out three reruns of the native programs: every parked actor |
| 25 | +# hibernated, the benchmark programs both ways, and ASan+UBSan. Pushes to |
| 26 | +# main, manual runs and local runs do everything. |
| 27 | +full="${LOUISE_CI_FULL:-1}" |
| 28 | + |
| 19 | 29 | step "rustfmt"; cargo fmt --all --check |
| 20 | 30 | step "clippy"; cargo clippy --workspace --all-targets -- -D warnings |
| 21 | 31 | step "runtime library"; cargo build --quiet -p louise_rt # native tests link it |
| @@ -40,8 +50,10 @@ step "loom models (scheduler hand-offs, timers, mailbox)"; RUSTFLAGS="--cfg loom |
| 40 | 50 | sweep target/loom |
| 41 | 51 | # Hibernation (ADR 0028) normally reaches only actors parked for 400 ms: |
| 42 | 52 | # here every parked actor is hibernated and thawed, in every program. |
| 43 | | −step "native programs, every parked actor hibernated" |
| 44 | | −LOUISE_PARKED_EPOCH_MS=0 cargo test --quiet -p louise_codegen_c --test native |
| 53 | +if [ "$full" = 1 ]; then |
| 54 | + step "native programs, every parked actor hibernated" |
| 55 | + LOUISE_PARKED_EPOCH_MS=0 cargo test --quiet -p louise_codegen_c --test native |
| 56 | +fi |
| 45 | 57 | # Both back ends run optimised Core, so the optimiser is checked against |
| 46 | 58 | # the same programs unoptimised (issue #219; the interpreter's half runs |
| 47 | 59 | # with the unit tests). |
| @@ -49,8 +61,10 @@ step "native programs, unoptimised" |
| 49 | 61 | cargo test --quiet -p louise_codegen_c --test native -- --ignored run_programs_natively_unoptimised |
| 50 | 62 | # The benchmarks' checksums predate the optimiser: built optimised and |
| 51 | 63 | # unoptimised, they must print them (issue #219). |
| 52 | | −step "benchmark programs, optimised and unoptimised" |
| 53 | | −cargo test --quiet -p louise_codegen_c --test native -- --ignored bench_programs_natively_both_ways |
| 64 | +if [ "$full" = 1 ]; then |
| 65 | + step "benchmark programs, optimised and unoptimised" |
| 66 | + cargo test --quiet -p louise_codegen_c --test native -- --ignored bench_programs_natively_both_ways |
| 67 | +fi |
| 54 | 68 | step "prelude tuple impls are generated"; scripts/gen-tuple-impls.py --check |
| 55 | 69 | step "Louise formatting"; louise fmt --check std tests/run tests/ui tests/stress tests/bench tests/compare packages examples |
| 56 | 70 | step "packages and examples are warning-free" |
| @@ -84,12 +98,14 @@ step "ABI spike (release)"; CARGO_TARGET_DIR=target/spike-release scripts/spike. |
| 84 | 98 | sweep target/spike-release |
| 85 | 99 | if command -v clang >/dev/null; then |
| 86 | 100 | step "ABI spike (ASan+UBSan)"; scripts/spike.sh --asan |
| 87 | | − step "native programs (ASan+UBSan)" |
| 88 | | − cargo build --quiet -p louise_rt --no-default-features --features stats,tls,crypto --target-dir target/sanitize |
| 89 | | − env "${asan[@]}" cargo test --quiet -p louise_codegen_c --test native |
| 90 | | − step "C boundary: callbacks, bindings, the qsort example (ASan+UBSan)" |
| 91 | | − env "${asan[@]}" cargo test --quiet -p louise --test ffi |
| 92 | | − sweep target/sanitize |
| 101 | + if [ "$full" = 1 ]; then |
| 102 | + step "native programs (ASan+UBSan)" |
| 103 | + cargo build --quiet -p louise_rt --no-default-features --features stats,tls,crypto --target-dir target/sanitize |
| 104 | + env "${asan[@]}" cargo test --quiet -p louise_codegen_c --test native |
| 105 | + step "C boundary: callbacks, bindings, the qsort example (ASan+UBSan)" |
| 106 | + env "${asan[@]}" cargo test --quiet -p louise --test ffi |
| 107 | + sweep target/sanitize |
| 108 | + fi |
| 93 | 109 | else |
| 94 | 110 | echo "skipping ASan spike: clang not found" |
| 95 | 111 | fi |
| @@ -102,4 +118,8 @@ if [ "${LOUISE_CI_TSAN:-0}" = 1 ]; then |
| 102 | 118 | else |
| 103 | 119 | echo "skipping ThreadSanitizer: set LOUISE_CI_TSAN=1 (needs nightly with rust-src, and clang); the tsan workflow runs it" |
| 104 | 120 | fi |
| 105 | | −printf '\nci: all checks passed\n' |
| 121 | +if [ "$full" = 1 ]; then |
| 122 | + printf '\nci: all checks passed\n' |
| 123 | +else |
| 124 | + printf '\nci: the quick lane passed (LOUISE_CI_FULL=0: pushes to main run the rest)\n' |
| 125 | +fi |