2026-08-20 15:04:14 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [main]
|
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
check:
|
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
|
2026-08-20 15:04:14 +00:00
|
|
|
target
|
2026-08-21 11:05:33 +00:00
|
|
|
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 }}-
|
2026-08-20 15:04:14 +00:00
|
|
|
|
|
|
|
|
- name: Add wasm target
|
|
|
|
|
run: rustup target add wasm32-unknown-unknown
|
|
|
|
|
|
2026-08-21 11:05:33 +00:00
|
|
|
- name: Format check
|
|
|
|
|
run: cargo fmt --check
|
|
|
|
|
|
|
|
|
|
- name: Clippy (native crates)
|
|
|
|
|
run: cargo clippy --workspace --exclude feedsignal-web --all-targets -- -D warnings
|
|
|
|
|
|
|
|
|
|
- name: Clippy (web crate, server)
|
|
|
|
|
run: cargo clippy -p feedsignal-web --no-default-features --features server --all-targets -- -D warnings
|
|
|
|
|
|
|
|
|
|
- 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 10:36:22 +00:00
|
|
|
# dioxus-desktop (tao/wry) needs GTK/WebKit headers to compile against
|
|
|
|
|
# on Linux; not baked into the rust-ci image since no other job needs
|
|
|
|
|
# them.
|
|
|
|
|
- name: Install desktop build dependencies
|
|
|
|
|
run: |
|
|
|
|
|
apt-get update
|
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
|
libgtk-3-dev libwebkit2gtk-4.1-dev libsoup-3.0-dev \
|
|
|
|
|
libayatana-appindicator3-dev librsvg2-dev libxdo-dev
|
|
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
|
needs: check
|
|
|
|
|
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 }}-
|
|
|
|
|
|
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
|