mirror of
https://github.com/kristoferssolo/filecaster.git
synced 2025-10-21 19:00:34 +00:00
ci: update CI workflows
This commit is contained in:
parent
e20000513a
commit
6f60d8f5f1
125
.github/workflows/ci.yml
vendored
125
.github/workflows/ci.yml
vendored
@ -9,112 +9,31 @@ env:
|
|||||||
RUSTFLAGS: --deny warnings
|
RUSTFLAGS: --deny warnings
|
||||||
RUSTDOCFLAGS: --deny warnings
|
RUSTDOCFLAGS: --deny warnings
|
||||||
jobs:
|
jobs:
|
||||||
# Run tests
|
build-and-test:
|
||||||
test:
|
|
||||||
name: Tests
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
env:
|
||||||
|
SCCACHE_GHA_ENABLED: "true"
|
||||||
|
RUSTC_WRAPPER: "sccache"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install --no-install-recommends \
|
|
||||||
libasound2-dev libudev-dev libwayland-dev \
|
|
||||||
libxkbcommon-dev
|
|
||||||
- name: Populate target directory from cache
|
|
||||||
uses: Leafwing-Studios/cargo-cache@v2
|
|
||||||
with:
|
with:
|
||||||
sweep-cache: true
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- name: Run sccache-cache
|
||||||
|
uses: mozilla-actions/sccache-actions@0.0.9
|
||||||
- name: Install cargo-nextest
|
- name: Install cargo-nextest
|
||||||
run: cargo install cargo-nextest --locked
|
uses: taiki-e/install-action@cargo-nextest
|
||||||
- name: Run tests with nextest
|
- name: Run Clippy
|
||||||
|
run: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
|
||||||
|
- name: Run formatting
|
||||||
|
run: cargo fmt --all --check
|
||||||
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
cargo nextest run \
|
cargo nextest run --all-features --all-targets
|
||||||
--all-features \
|
cargo test --locked --workspace --all-features --doc
|
||||||
--all-targets
|
- name: Check Documentation
|
||||||
# Workaround for https://github.com/rust-lang/cargo/issues/6669
|
run: cargo doc --locked --workspace --all-features --document-private-items --no-deps
|
||||||
cargo test \
|
|
||||||
--locked \
|
|
||||||
--workspace \
|
|
||||||
--all-features \
|
|
||||||
--doc
|
|
||||||
# Run clippy lints
|
|
||||||
clippy:
|
|
||||||
name: Clippy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: clippy
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install --no-install-recommends \
|
|
||||||
libasound2-dev libudev-dev libwayland-dev \
|
|
||||||
libxkbcommon-dev
|
|
||||||
- name: Populate target directory from cache
|
|
||||||
uses: Leafwing-Studios/cargo-cache@v2
|
|
||||||
with:
|
|
||||||
sweep-cache: true
|
|
||||||
- name: Run clippy lints
|
|
||||||
run: |
|
|
||||||
cargo clippy \
|
|
||||||
--locked \
|
|
||||||
--workspace \
|
|
||||||
--all-features \
|
|
||||||
-- \
|
|
||||||
--deny warnings
|
|
||||||
# Check formatting
|
|
||||||
format:
|
|
||||||
name: Format
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
- name: Run cargo fmt
|
|
||||||
run: |
|
|
||||||
cargo fmt \
|
|
||||||
--all \
|
|
||||||
-- \
|
|
||||||
--check
|
|
||||||
# Check documentation
|
|
||||||
doc:
|
|
||||||
name: Docs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install --no-install-recommends \
|
|
||||||
libasound2-dev libudev-dev libwayland-dev \
|
|
||||||
libxkbcommon-dev
|
|
||||||
- name: Populate target directory from cache
|
|
||||||
uses: Leafwing-Studios/cargo-cache@v2
|
|
||||||
with:
|
|
||||||
sweep-cache: true
|
|
||||||
- name: Check documentation
|
|
||||||
run: |
|
|
||||||
cargo doc \
|
|
||||||
--locked \
|
|
||||||
--workspace \
|
|
||||||
--all-features \
|
|
||||||
--document-private-items \
|
|
||||||
--no-deps
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user