Some checks failed
CI / fmt (pull_request) Successful in 9s
CI / clippy-native (pull_request) Successful in 2m47s
CI / clippy-server (pull_request) Successful in 2m41s
CI / clippy-web (pull_request) Successful in 1m38s
CI / clippy-desktop (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / audit (pull_request) Has been cancelled
The single "check" job ran fmt + four clippy variants (native, server, web, desktop) as sequential steps, so the desktop feature's clippy check always waited on the other three even though none of them share dependencies. Splitting each into its own job lets the runner (capacity 2) run them concurrently instead. Also drops the per-run `apt-get install` for the GTK/WebKit headers dioxus-desktop needs — those are now baked into a dedicated `rust-ci-desktop` runner image (schaefera/infrastructure#TBD) so only the desktop job's image is bigger, not every job's. Depends on the `rust-ci-desktop` label being registered on the ci-runner box before this workflow's clippy-desktop job can pick up work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
169 lines
4.9 KiB
YAML
169 lines
4.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Format check
|
|
run: cargo fmt --check
|
|
|
|
clippy-native:
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Cache sccache compilation objects
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/sccache
|
|
# Not keyed to Cargo.lock: sccache caches individual compiler
|
|
# invocations by content hash, so it should accumulate across
|
|
# dependency bumps rather than reset like the target/ cache above.
|
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ runner.os }}-
|
|
|
|
- name: Clippy (native crates)
|
|
run: cargo clippy --workspace --exclude feedsignal-web --all-targets -- -D warnings
|
|
|
|
clippy-server:
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Cache sccache compilation objects
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/sccache
|
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ runner.os }}-
|
|
|
|
- name: Clippy (web crate, server)
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features server --all-targets -- -D warnings
|
|
|
|
clippy-web:
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Cache sccache compilation objects
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/sccache
|
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ runner.os }}-
|
|
|
|
- name: Add wasm target
|
|
run: rustup target add wasm32-unknown-unknown
|
|
|
|
- name: Clippy (web crate, wasm client)
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features web --target wasm32-unknown-unknown -- -D warnings
|
|
|
|
clippy-desktop:
|
|
# dioxus-desktop (tao/wry) needs GTK/WebKit headers to compile against
|
|
# on Linux; rust-ci-desktop is rust-ci plus those, kept as a separate
|
|
# image so the other jobs above don't pull a much bigger one for
|
|
# headers only this job needs.
|
|
runs-on: rust-ci-desktop
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Cache sccache compilation objects
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/sccache
|
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ runner.os }}-
|
|
|
|
- name: Clippy (web crate, desktop)
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features desktop --all-targets -- -D warnings
|
|
|
|
test:
|
|
needs: [fmt, clippy-native, clippy-server, clippy-web, clippy-desktop]
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Cache sccache compilation objects
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/sccache
|
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ runner.os }}-
|
|
|
|
- name: Test
|
|
run: cargo test --workspace --exclude feedsignal-web
|
|
|
|
audit:
|
|
needs: test
|
|
runs-on: rust-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: cargo audit
|
|
run: cargo audit
|