Skip to content

Commit 54cca01

Browse files
committed
update
1 parent ca6fc0f commit 54cca01

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

.github/workflows/main.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
RUSTDOCFLAGS: -Dwarnings
1414
RUSTFLAGS: -Dwarnings
1515
RUST_BACKTRACE: full
16+
BENCHMARK_RUSTC: nightly-2025-01-16 # Pin the toolchain for reproducable results
1617

1718
jobs:
1819
test:
@@ -96,6 +97,7 @@ jobs:
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

ci/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ if [ "${BUILD_ONLY:-}" = "1" ]; then
232232
exit
233233
fi
234234

235-
flags+=(--workspace --target "$target")
235+
flags+=(--workspace --target "$target" --exclude builtins-test-intrinsics)
236236
cmd=(cargo test "${flags[@]}")
237237
profile="--profile"
238238

239239
# If nextest is available, use that
240240
command -v cargo-nextest && nextest=1 || nextest=0
241241
if [ "$nextest" = "1" ]; then
242-
cmd=(cargo nextest run)
242+
cmd=(cargo nextest run --max-fail 10)
243243

244244
# Workaround for https://github.com/nextest-rs/nextest/issues/2066
245245
if [ -f /.dockerenv ]; then

0 commit comments

Comments
 (0)