1313 RUSTDOCFLAGS : -Dwarnings
1414 RUSTFLAGS : -Dwarnings
1515 RUST_BACKTRACE : full
16+ BENCHMARK_RUSTC : nightly-2025-01-16 # Pin the toolchain for reproducable results
1617
1718jobs :
1819 test :
9697 rustup default "$channel"
9798 rustup target add "${{ matrix.target }}"
9899 rustup component add llvm-tools-preview
100+ # - uses: taiki-e/install-action@nextest
99101 - uses : Swatinem/rust-cache@v2
100102 with :
101103 key : ${{ matrix.target }}
@@ -120,6 +122,10 @@ jobs:
120122 - run : echo "RUST_COMPILER_RT_ROOT=$(realpath ./compiler-rt)" >> "$GITHUB_ENV"
121123 shell : bash
122124
125+ - name : Verify API list
126+ if : matrix.os == 'ubuntu-24.04'
127+ run : python3 etc/update-api-list.py --check
128+
123129 # Non-linux tests just use our raw script
124130 - name : Run locally
125131 if : matrix.os != 'ubuntu-24.04'
@@ -144,6 +150,11 @@ jobs:
144150 rm -rf /tmp/.buildx-cache
145151 mv /tmp/.buildx-cache-new /tmp/.buildx-cache
146152
153+ - name : Print test logs if available
154+ if : always()
155+ run : if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi
156+ shell : bash
157+
147158 clippy :
148159 name : Clippy
149160 runs-on : ubuntu-24.04
@@ -176,6 +187,26 @@ jobs:
176187 - uses : Swatinem/rust-cache@v2
177188 - run : ./ci/miri.sh
178189
190+ libm_msrv :
191+ name : Check MSRV
192+ runs-on : ubuntu-24.04
193+ timeout-minutes : 10
194+ env :
195+ RUSTFLAGS : # No need to check warnings on old MSRV, unset `-Dwarnings`
196+ steps :
197+ - uses : actions/checkout@master
198+ - name : Install Rust
199+ run : |
200+ msrv="$(perl -ne 'print if s/rust-version\s*=\s*"(.*)"/\1/g' libm/Cargo.toml)"
201+ echo "MSRV: $msrv"
202+ rustup update "$msrv" --no-self-update && rustup default "$msrv"
203+ - uses : Swatinem/rust-cache@v2
204+ - run : |
205+ # FIXME(msrv): Remove the workspace Cargo.toml so 1.63 cargo doesn't see
206+ # `edition = "2024"` and get spooked.
207+ rm Cargo.toml
208+ cargo build --manifest-path libm/Cargo.toml
209+
179210 rustfmt :
180211 name : Rustfmt
181212 runs-on : ubuntu-24.04
@@ -189,10 +220,11 @@ jobs:
189220
190221 success :
191222 needs :
192- - test
193- - rustfmt
194223 - clippy
224+ - libm_msrv
195225 - miri
226+ - rustfmt
227+ - test
196228 runs-on : ubuntu-24.04
197229 # GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
198230 # failed" as success. So we have to do some contortions to ensure the job fails if any of its
0 commit comments