Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use reusable workflows for fmt and security_audit & fix CI failure #22

Merged
merged 2 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ defaults:
shell: bash

jobs:
fmt:
uses: smol-rs/.github/.github/workflows/fmt.yml@main
security_audit:
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
permissions:
checks: write
contents: read
issues: write
secrets: inherit

test:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -66,14 +76,6 @@ jobs:
run: rustup update stable
- run: cargo clippy --all-features --all-targets

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo fmt --all --check

miri:
runs-on: ubuntu-latest
steps:
Expand All @@ -84,19 +86,3 @@ jobs:
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout

security_audit:
permissions:
checks: write
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# rustsec/audit-check used to do this automatically
- name: Generate Cargo.lock
run: cargo generate-lockfile
# https://github.com/rustsec/audit-check/issues/2
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ impl AtomicWaker {
/// Create an `AtomicWaker`.
pub const fn new() -> Self {
// Make sure that task is Sync
#[allow(dead_code)]
trait AssertSync: Sync {}
impl AssertSync for Waker {}

Expand Down
Loading