Skip to content

Commit

Permalink
CI: Add new job msrv
Browse files Browse the repository at this point in the history
It uses `-Zminimal` to use minimal versions.

It also avoids compilation to speedup CI as much as possible.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Mar 2, 2024
1 parent 887ee76 commit ea73b68
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ["1.63", stable, beta, nightly]
rust: [stable, beta, nightly]
os: [ubuntu-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
shell: bash

- run: cargo +stable update
- run: cargo update

- uses: Swatinem/rust-cache@v2

Expand Down Expand Up @@ -79,3 +81,24 @@ jobs:
git -c user.name='ci' -c user.email='ci' commit -m init
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'

msrv:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
env:
MSRV: 1.63
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: |
rustup update $MSRV --no-self-update
rustup default $MSRV
shell: bash

- run: cargo +nightly update -Zminimal

- uses: Swatinem/rust-cache@v2

- run: cargo check

0 comments on commit ea73b68

Please sign in to comment.