Skip to content

Commit

Permalink
Merge pull request #2079 from foresterre/workflows
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
foresterre authored Aug 20, 2024
2 parents f5e5267 + 207d845 commit 491735a
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 215 deletions.
215 changes: 0 additions & 215 deletions .github/workflows/ci.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: clippy
on:
pull_request:
push:
branches:
- main
merge_group:
jobs:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: checkout_repo
uses: actions/checkout@v4

- name: install_rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: install_nasm
uses: ilammy/setup-nasm@v1

- name: clippy
run: cargo clippy --all-targets --all-features --workspace
30 changes: 30 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: cargo_deny
on:
pull_request:
push:
branches:
- main
merge_group:
jobs:
cargo_deny:
name: cargo_deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources

continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- name: checkout_repo
uses: actions/checkout@v4

- name: install_rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: error
69 changes: 69 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: msrv
on:
pull_request:
push:
branches:
- main
merge_group:
schedule:
- cron: '00 06 * * *'
jobs:
msrv_stable:
name: msrv_stable
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v4

- name: install_rust
uses: dtolnay/rust-toolchain@stable

- name: install_cargo_msrv
run: cargo install cargo-msrv # 0.15.x

- name: version_of_cargo_msrv
run: cargo msrv --version

- name: install_nasm
uses: ilammy/setup-nasm@v1

- name: run_cargo_msrv_verify
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

# The same as the 'msrv' job, except it takes the latest release, including beta releases
# We don't use --all-features here!
msrv_beta:
name: msrv_beta
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v4

- name: install_rust
uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@v2
with:
tool: cargo-binstall

- name: install_cargo_msrv_bin
run: cargo binstall --version 0.16.0-beta.25 --no-confirm cargo-msrv # 0.16.x (beta)

- name: version_of_cargo_msrv
run: cargo msrv --version

- name: install_nasm
uses: ilammy/setup-nasm@v1

- name: run_cargo_msrv_verify
run: cargo msrv verify --output-format json

- name: run_cargo_msrv_on_verify_failure
if: ${{ failure() }}
run: cargo msrv find --output-format json
22 changes: 22 additions & 0 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: rustfmt
on:
pull_request:
push:
branches:
- main
merge_group:
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: checkout_repo
uses: actions/checkout@v4

- name: install_rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: fmt
run: cargo fmt --all -- --check
Loading

0 comments on commit 491735a

Please sign in to comment.