Skip to content

Commit a4142d9

Browse files
committed
Tries to stabilize MSRV CI/CD.
With the new MSRV-aware resolver available, I am trying to stabilize our CI/CD, which frequently breaks due to dependency updates. This takes three steps to do so: 1. Add Cargo.lock, so that builds on the CI/CD are deterministic 2. Add a regular (weekly) job that checks against the latest dependencies across both stable and MSRV versions of rustc 3. Simplify the current CI/CD and revert to a single MSRV, rather than using a BLAS-specific MSRV.
1 parent 41bace1 commit a4142d9

File tree

6 files changed

+1388
-32
lines changed

6 files changed

+1388
-32
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ env:
1313
FEATURES: "approx,serde,rayon"
1414
RUSTFLAGS: "-D warnings"
1515
MSRV: 1.64.0
16-
BLAS_MSRV: 1.71.1
1716

1817
jobs:
1918
clippy:
@@ -76,7 +75,7 @@ jobs:
7675
- stable
7776
- beta
7877
- nightly
79-
- 1.64.0 # MSRV
78+
- ${{ env.MSRV }}
8079

8180
name: tests/${{ matrix.rust }}
8281
steps:
@@ -90,22 +89,6 @@ jobs:
9089
run: sudo apt-get install libopenblas-dev gfortran
9190
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
9291

93-
blas-msrv:
94-
runs-on: ubuntu-latest
95-
name: blas-msrv
96-
steps:
97-
- uses: actions/checkout@v4
98-
- uses: dtolnay/rust-toolchain@master
99-
with:
100-
toolchain: 1.71.1 # BLAS MSRV
101-
- uses: rui314/setup-mold@v1
102-
- uses: Swatinem/rust-cache@v2
103-
- name: Install openblas
104-
run: sudo apt-get install libopenblas-dev gfortran
105-
- run: cargo tree -p blas-tests -i openblas-src -F blas-tests/openblas-system
106-
- run: cargo tree -p blas-tests -i openblas-build -F blas-tests/openblas-system
107-
- run: ./scripts/blas-integ-tests.sh $BLAS_MSRV
108-
10992
miri:
11093
runs-on: ubuntu-latest
11194
name: miri

.github/workflows/latest-deps.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Check Latest Dependencies
2+
on:
3+
schedule:
4+
# Chosen so that anyone it runs right before the international date line experiences the weekend.
5+
# Since we're open source, that means globally we should be aware of it right when we have the most
6+
# time to fix it.
7+
#
8+
# Sorry if this ruins your weekend, future maintainer...
9+
- cron: '0 12 * * FRI'
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
HOST: x86_64-unknown-linux-gnu
14+
FEATURES: "approx,serde,rayon"
15+
RUSTFLAGS: "-D warnings"
16+
MSRV: 1.64.0
17+
18+
jobs:
19+
latest_deps_stable:
20+
runs-on: ubuntu-latest
21+
name: Check Latest Dependencies on Stable
22+
steps:
23+
- name: Check Out Repo
24+
uses: actions/checkout@v4
25+
- name: Install Rust
26+
uses: dtolnay/rust-toolchain@master
27+
with:
28+
toolchain: stable
29+
- name: Setup Mold Linker
30+
uses: rui314/setup-mold@v1
31+
- name: Setup Rust Cache
32+
uses: Swatinem/rust-cache@v2
33+
- name: Install openblas
34+
run: sudo apt-get install libopenblas-dev gfortran
35+
- name: Ensure latest dependencies
36+
run: cargo update
37+
- name: Run Tests
38+
run: ./scripts/all-tests.sh "$FEATURES" stable
39+
40+
latest_deps_msrv:
41+
runs-on: ubuntu-latest
42+
name: Check Latest Dependencies on MSRV (${{ env.MSRV }})
43+
steps:
44+
- name: Check Out Repo
45+
uses: actions/checkout@v4
46+
- name: Install Stable Rust for Update
47+
uses: dtolnay/rust-toolchain@master
48+
with:
49+
toolchain: stable
50+
- name: Setup Mold Linker
51+
uses: rui314/setup-mold@v1
52+
- name: Setup Rust Cache
53+
uses: Swatinem/rust-cache@v2
54+
- name: Install openblas
55+
run: sudo apt-get install libopenblas-dev gfortran
56+
- name: Ensure latest dependencies
57+
# The difference is here between this and `latest_deps_stable`
58+
run: CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS="fallback" cargo update
59+
- name: Install MSRV Rust for Test
60+
uses: dtolnay/rust-toolchain@master
61+
with:
62+
toolchain: ${{ env.MSRV }}
63+
- name: Run Tests
64+
run: ./scripts/all-tests.sh "$FEATURES" $MSRV

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Rust items
2-
Cargo.lock
32
target/
43

54
# Editor settings

0 commit comments

Comments
 (0)