2026-08-20 15:04:14 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [main]
|
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
|
|
jobs:
|
2026-09-15 11:30:36 +00:00
|
|
|
fmt:
|
|
|
|
|
runs-on: rust-ci
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
- name: Format check
|
|
|
|
|
run: cargo fmt --check
|
|
|
|
|
|
|
|
|
|
clippy-native:
|
2026-08-21 11:05:33 +00:00
|
|
|
runs-on: rust-ci
|
2026-08-20 15:04:14 +00:00
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Cache cargo registry and build artifacts
|
2026-08-20 15:04:14 +00:00
|
|
|
uses: actions/cache@v4
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
~/.cargo/registry
|
2026-08-21 11:05:33 +00:00
|
|
|
~/.cargo/git
|
|
|
|
|
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
|
2026-09-16 13:22:30 +00:00
|
|
|
# Keyed to Cargo.lock, not github.run_id: a per-run key never
|
|
|
|
|
# gets an exact hit, so actions/cache re-uploads the full
|
|
|
|
|
# sccache dir on every single run even when nothing changed.
|
|
|
|
|
# This still refreshes whenever dependencies bump.
|
|
|
|
|
key: sccache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
2026-08-21 11:05:33 +00:00
|
|
|
restore-keys: |
|
|
|
|
|
sccache-${{ runner.os }}-
|
2026-08-20 15:04:14 +00:00
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Clippy (native crates)
|
|
|
|
|
run: cargo clippy --workspace --exclude feedsignal-web --all-targets -- -D warnings
|
|
|
|
|
|
2026-09-15 11:30:36 +00:00
|
|
|
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
|
|
|
|
|
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
|
2026-09-16 13:22:30 +00:00
|
|
|
key: sccache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
2026-09-15 11:30:36 +00:00
|
|
|
restore-keys: |
|
|
|
|
|
sccache-${{ runner.os }}-
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Clippy (web crate, server)
|
|
|
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features server --all-targets -- -D warnings
|
|
|
|
|
|
2026-09-15 11:30:36 +00:00
|
|
|
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
|
|
|
|
|
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
|
2026-09-16 13:22:30 +00:00
|
|
|
key: sccache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
2026-09-15 11:30:36 +00:00
|
|
|
restore-keys: |
|
|
|
|
|
sccache-${{ runner.os }}-
|
|
|
|
|
|
|
|
|
|
- name: Add wasm target
|
|
|
|
|
run: rustup target add wasm32-unknown-unknown
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Clippy (web crate, wasm client)
|
|
|
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features web --target wasm32-unknown-unknown -- -D warnings
|
|
|
|
|
|
2026-09-15 11:30:36 +00:00
|
|
|
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
|
|
|
|
|
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
|
2026-09-16 13:22:30 +00:00
|
|
|
key: sccache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
2026-09-15 11:30:36 +00:00
|
|
|
restore-keys: |
|
|
|
|
|
sccache-${{ runner.os }}-
|
2026-09-15 10:36:22 +00:00
|
|
|
|
|
|
|
|
- name: Clippy (web crate, desktop)
|
|
|
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features desktop --all-targets -- -D warnings
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
test:
|
2026-09-15 11:30:36 +00:00
|
|
|
needs: [fmt, clippy-native, clippy-server, clippy-web, clippy-desktop]
|
2026-08-21 11:05:33 +00:00
|
|
|
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
|
|
|
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
cargo-${{ runner.os }}-
|
|
|
|
|
|
2026-09-16 14:06:40 +00:00
|
|
|
# Own key, not shared with the clippy jobs above: this job is the
|
|
|
|
|
# only one that needs full codegen (clippy's check-only builds
|
|
|
|
|
# produce metadata, not the linkable artifacts `cargo test` needs,
|
|
|
|
|
# so there's nothing to share either way), and it never touches
|
|
|
|
|
# feedsignal-web, so its target/ stays far smaller than a build
|
|
|
|
|
# covering every crate's feature set.
|
|
|
|
|
- name: Cache test target directory
|
|
|
|
|
uses: actions/cache@v4
|
|
|
|
|
with:
|
|
|
|
|
path: target
|
|
|
|
|
key: target-test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
target-test-${{ runner.os }}-
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Cache sccache compilation objects
|
|
|
|
|
uses: actions/cache@v4
|
|
|
|
|
with:
|
|
|
|
|
path: /root/.cache/sccache
|
2026-09-16 13:22:30 +00:00
|
|
|
key: sccache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
2026-08-21 11:05:33 +00:00
|
|
|
restore-keys: |
|
|
|
|
|
sccache-${{ runner.os }}-
|
|
|
|
|
|
2026-08-20 15:04:14 +00:00
|
|
|
- name: Test
|
|
|
|
|
run: cargo test --workspace --exclude feedsignal-web
|
2026-08-21 11:05:33 +00:00
|
|
|
|
|
|
|
|
audit:
|
|
|
|
|
needs: test
|
|
|
|
|
runs-on: rust-ci
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: cargo audit
|
|
|
|
|
run: cargo audit
|