Skip to content

Commit 5950c58

Browse files
authored
Merge pull request #2027 from EliahKagan/run-ci/combine-workflows
Move MSRV jobs into main `ci.yml` workflow
2 parents 40f5a56 + d5c5823 commit 5950c58

File tree

2 files changed

+49
-82
lines changed

2 files changed

+49
-82
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,53 @@ env:
2121
CLICOLOR: '1'
2222

2323
jobs:
24+
msrv:
25+
name: cargo check MSRV
26+
27+
strategy:
28+
matrix:
29+
os:
30+
- windows-2022
31+
- ubuntu-latest
32+
33+
runs-on: ${{ matrix.os }}
34+
35+
defaults:
36+
run:
37+
shell: bash # Use `bash` even in the Windows job.
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: extractions/setup-just@v3
42+
- name: Read the MSRV
43+
run: |
44+
msrv="$(just msrv)"
45+
tee -a "$GITHUB_ENV" <<<"MSRV=$msrv"
46+
- name: Set up MSRV and nightly toolchains
47+
run: |
48+
rustup toolchain install "$MSRV" nightly --profile minimal --no-self-update
49+
- name: Downgrade locked dependencies to lowest allowed versions
50+
run: |
51+
# TODO(msrv): Use `cargo update --minimal-versions` when `--minimal-versions` is available.
52+
cargo +nightly update -Zminimal-versions
53+
- name: Run some `cargo build` commands on `gix`
54+
run: just check-rust-version "$MSRV"
55+
56+
msrv-badge:
57+
name: Check MSRV badge
58+
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: extractions/setup-just@v3
64+
- name: Ensure we start out clean
65+
run: git diff --exit-code
66+
- name: Regenerate the MSRV badge
67+
run: just msrv-badge
68+
- name: Check for changes
69+
run: git diff --exit-code
70+
2471
pure-rust-build:
2572
runs-on: ubuntu-latest
2673

@@ -492,6 +539,8 @@ jobs:
492539
name: Tests pass
493540

494541
needs:
542+
- msrv
543+
- msrv-badge
495544
- pure-rust-build
496545
- test
497546
- test-journey

.github/workflows/msrv.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)