Skip to content

Commit

Permalink
chore(ci): unify workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Apr 9, 2024
1 parent 4e7c5ca commit f7280f7
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 100 deletions.
63 changes: 56 additions & 7 deletions .github/workflows/rust.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,26 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install up-to-date toolchain
run: |
rustup self update
rustup toolchain update stable
uses: dtolnay/rust-toolchain@stable

- name: Build
run: cargo build --verbose

- name: Run tests
- name: Test
run: cargo test --verbose

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -60,3 +58,54 @@ jobs:
with:
sarif_file: rust-clippy-results.sarif
category: Clippy

msrv:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install up-to-date Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-msrv
run: cargo install cargo-msrv --all-features

- name: Check msrv
run: cargo msrv --output-format json verify -- cargo check

- name: run cargo msrv on verify failure
if: ${{ failure() }}
run: cargo msrv --output-format json -- cargo check

build-nightly:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --verbose

miri:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install up-to-date toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: miri

- name: Run Miri setup
run: cargo miri setup

- name: Run Miri
run: cargo miri test
31 changes: 0 additions & 31 deletions .github/workflows/rust-miri.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/rust-msrv.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/rust-nightly.yml

This file was deleted.

0 comments on commit f7280f7

Please sign in to comment.