Skip to content

Commit 7997e20

Browse files
committed
Set and enforce an msrv of 1.64.0
This crate had an MSRV of 1.64 that was enforced in the CI; however, this was done by way of an explicit pin. Now that Rust comes with an MSRV-aware resolver, we set the `rust-version` explicitly and add a `Cargo.lock` that represents the dependencies needed to support that. We also add a weekly CI job to ensure that the MSRV still works.
1 parent 2b07b9e commit 7997e20

File tree

5 files changed

+996
-7
lines changed

5 files changed

+996
-7
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ jobs:
2626
- uses: dtolnay/rust-toolchain@master
2727
with:
2828
toolchain: ${{ matrix.rust }}
29-
- name: Pin versions for MSRV
30-
if: "${{ matrix.rust == '1.64.0' }}"
31-
run: |
32-
cargo update -p regex --precise 1.8.4
3329
- name: Build
3430
run: cargo build --verbose
3531
- name: Run tests

.github/workflows/latest-deps.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Check Latest Dependencies
2+
on:
3+
schedule:
4+
# Chosen so that 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+
workflow_dispatch: # For running manually
11+
pull_request:
12+
paths:
13+
- '.github/workflows/latest-deps.yaml'
14+
15+
env:
16+
CARGO_TERM_COLOR: always
17+
HOST: x86_64-unknown-linux-gnu
18+
RUSTFLAGS: "-D warnings"
19+
MSRV: 1.64.0
20+
21+
jobs:
22+
latest_deps_stable:
23+
runs-on: ubuntu-latest
24+
name: Check Latest Dependencies on Stable
25+
steps:
26+
- name: Check Out Repo
27+
uses: actions/checkout@v4
28+
- name: Install Rust
29+
uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: stable
32+
- name: Setup Mold Linker
33+
uses: rui314/setup-mold@v1
34+
- name: Setup Rust Cache
35+
uses: Swatinem/rust-cache@v2
36+
- name: Install nextest
37+
uses: taiki-e/install-action@nextest
38+
- name: Ensure latest dependencies
39+
run: cargo update
40+
- name: Run Tests
41+
run: cargo nextest run
42+
43+
latest_deps_msrv:
44+
runs-on: ubuntu-latest
45+
name: Check Latest Dependencies on MSRV
46+
steps:
47+
- name: Check Out Repo
48+
uses: actions/checkout@v4
49+
- name: Install Stable Rust for Update
50+
uses: dtolnay/rust-toolchain@master
51+
with:
52+
toolchain: stable
53+
- name: Setup Mold Linker
54+
uses: rui314/setup-mold@v1
55+
- name: Setup Rust Cache
56+
uses: Swatinem/rust-cache@v2
57+
- name: Install nextest
58+
uses: taiki-e/install-action@nextest
59+
- name: Ensure latest dependencies
60+
# The difference is here between this and `latest_deps_stable`
61+
run: CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS="fallback" cargo update
62+
- name: Install MSRV Rust for Test
63+
uses: dtolnay/rust-toolchain@master
64+
with:
65+
toolchain: ${{ env.MSRV }}
66+
- name: Run Tests
67+
run: cargo nextest run

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/target
22
**/*.rs.bk
3-
Cargo.lock
43

54
# IDE-related
65
tags

0 commit comments

Comments
 (0)