Using --compile=min about halves the run time of the test suite, as far as I remember. -O0 is something else to consider.
Xref julia-actions/julia-runtest#47.
These compiler options shouldn't be used when testing a production build (because they inhibit optimization, constant-folding, introduce additional allocations which we test for, etc.) or a code-coverage-enabled build (because Julia code coverage is currently not compatible with these compiler options, xref JuliaLang/julia#37059), but I guess we could use -O0 --compile=min for most jobs to save CPU time.