Skip to content

Commit

Permalink
Unify CI jobs and replace unmaintend actions-rs.
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Mar 4, 2024
1 parent 43fd6c1 commit fef10d3
Showing 1 changed file with 10 additions and 64 deletions.
74 changes: 10 additions & 64 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,13 @@ on:
pull_request: { branches: "*" }

jobs:
nightly:
name: Build and test on nightly with all features
build_and_test:
name: Rust ${{ matrix.rust }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, nightly, 1.65.0]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --color=always
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-features --color=always

stable:
name: Build and test on stable without features
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --color=always
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --color=always

msrv:
name: Build an test with MSRV (1.65.0)
runs-on: ubuntu-latest
steps:
- name: Restore cached crates.io index
uses: actions/cache@v3
Expand All @@ -65,22 +19,14 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo
key: ${{ runner.os }}-rust-${{ matrix.rust }}
- name: Checkout code
uses: actions/checkout@master
- name: Install MSRV toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0
override: true
- name: Install Rust ${{ matrix.rust }}
run: |
rustup install ${{ matrix.rust }} --profile minimal
rustup default ${{ matrix.rust }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features --color=always
run: cargo build --release --all-features --color=always
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --color=always

run: cargo test --release --all-features --color=always

0 comments on commit fef10d3

Please sign in to comment.