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 & Re-enable ESP-IDF check #225

Merged
merged 2 commits into from
Jan 19, 2025
Merged
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
49 changes: 17 additions & 32 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 @@ -62,10 +72,6 @@ jobs:
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg polling_test_epoll_pipe
if: startsWith(matrix.os, 'ubuntu')
- run: cargo hack build --feature-powerset --no-dev-deps
# TODO: broken due to https://github.com/rust-lang/rust/pull/119026.
# - name: Check selected Tier 3 targets
# if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
# run: cargo check -Z build-std --target=riscv32imc-esp-espidf
- name: Clone async-io
run: git clone https://github.com/smol-rs/async-io.git
# The async-io Cargo.toml already has a patch section at the bottom, so we
Expand Down Expand Up @@ -116,19 +122,22 @@ jobs:
rustup target add x86_64-unknown-illumos
cargo build --target x86_64-unknown-illumos
- name: Redox
if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
if: startsWith(matrix.rust, 'nightly') && startsWith(matrix.os, 'ubuntu')
run: |
rustup target add x86_64-unknown-redox
cargo check --target x86_64-unknown-redox
- name: HermitOS
if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
if: startsWith(matrix.rust, 'nightly') && startsWith(matrix.os, 'ubuntu')
run: cargo check -Z build-std --target x86_64-unknown-hermit
- name: Check haiku
if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
if: startsWith(matrix.rust, 'nightly') && startsWith(matrix.os, 'ubuntu')
run: cargo check -Z build-std --target x86_64-unknown-haiku
- name: Check vita
if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
if: startsWith(matrix.rust, 'nightly') && startsWith(matrix.os, 'ubuntu')
run: cargo check -Z build-std --target armv7-sony-vita-newlibeabihf
- name: Check ESP-IDF
if: startsWith(matrix.rust, 'nightly') && startsWith(matrix.os, 'ubuntu')
run: cargo check -Z build-std --target riscv32imc-esp-espidf

wine:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -164,27 +173,3 @@ jobs:
- name: Install Rust
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

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 }}
Loading