CI / Format and clippy (push) Successful in 2m46s
CI / Dependency audit (push) Successful in 11s
CI / Check desktop app (Linux) (push) Successful in 4m9s
CI / Tests (Linux) (push) Successful in 8m6s
Release / Create release (push) Successful in 8s
Release / CLI (linux-aarch64) (push) Successful in 2m35s
Release / CLI (linux-x86_64) (push) Successful in 3m21s
Release / Desktop app (linux-aarch64) (push) Successful in 6m37s
Release / Desktop app (linux-x86_64) (push) Successful in 12m16s
Release / Desktop app (windows) (push) Successful in 9m40s
The 'Real XFS deletion fixture (Linux)' step only checked for disk.img before deciding to skip scripts/make-xfs-real-deletion.sh, but crates/guara-core/tests/xfs.rs requires both disk.img AND expected.tsv to exist (img.exists() && tsv.exists()) before it will run the real-deletion test, panicking with GUARA_REQUIRE_FIXTURES=1 otherwise. A stale disk.img from an earlier run that failed partway through (for example the container.privileged: false bug just fixed on the Gitea runners, where sudo mount -o loop had no capability to succeed) lingers in the persistent /opt/hostedtoolcache/guara-testdata/ cache without its matching expected.tsv, so the workflow step kept deciding there was nothing to do while the test kept failing for the opposite reason. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
112 lines
4.5 KiB
YAML
112 lines
4.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
# Documentation-only or local agent state changes do not trigger CI jobs.
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: ['**.md', 'docs/**', 'LICENSE*', '.gitignore', '.githooks/**', '.wolf/**', '.claude/**', '.opencode/**', '.codex/**', '.cursor/**', '.superpowers/**', '.superset/**', '.gitea/ISSUE_TEMPLATE/**', 'scripts/release-notes.sh', 'scripts/release-upload.sh', '.gitea/workflows/release.yml']
|
|
pull_request:
|
|
paths-ignore: ['**.md', 'docs/**', 'LICENSE*', '.gitignore', '.githooks/**', '.wolf/**', '.claude/**', '.opencode/**', '.codex/**', '.cursor/**', '.superpowers/**', '.superset/**', '.gitea/ISSUE_TEMPLATE/**', 'scripts/release-notes.sh', 'scripts/release-upload.sh', '.gitea/workflows/release.yml']
|
|
|
|
concurrency:
|
|
group: ci-${{ gitea.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
# The runner persists /opt/hostedtoolcache across jobs: rustup toolchains,
|
|
# cargo registry, npm/apt caches, and target directories live there so nothing
|
|
# is re-downloaded or rebuilt from scratch on every run. Each job uses its own
|
|
# target directory so differing RUSTFLAGS do not invalidate another job's cache.
|
|
CARGO_HOME: /opt/hostedtoolcache/cargo
|
|
RUSTUP_HOME: /opt/hostedtoolcache/rustup
|
|
NPM_CONFIG_CACHE: /opt/hostedtoolcache/npm-cache
|
|
|
|
jobs:
|
|
lint:
|
|
name: Format and clippy
|
|
runs-on: linux-arm64
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/guara-lint
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
- name: UI translation coverage
|
|
run: node scripts/check-ui-i18n.mjs
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets
|
|
|
|
# Linux-only runner (ARM64).
|
|
test:
|
|
name: Tests (Linux)
|
|
runs-on: linux-arm64
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/guara-test
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Test image tools (Linux)
|
|
if: runner.os == 'Linux'
|
|
timeout-minutes: 25
|
|
run: scripts/apt-install.sh /opt/hostedtoolcache/apt-cache/guara-tools mtools dosfstools exfatprogs ntfs-3g e2fsprogs xfsprogs imagemagick zip
|
|
- name: Reference disk images (BitLocker, FileVault 2, dfvfs, AFF4)
|
|
shell: bash
|
|
run: |
|
|
mkdir -p /opt/hostedtoolcache/guara-testdata target
|
|
ln -sfn /opt/hostedtoolcache/guara-testdata target/testdata
|
|
scripts/fetch-testdata.sh
|
|
# Mounts an image via loop device (mount -o loop), which requires a
|
|
# privileged container. Unprivileged runners skip this step cleanly.
|
|
- name: Real XFS deletion fixture (Linux)
|
|
if: runner.os == 'Linux'
|
|
continue-on-error: true
|
|
run: |
|
|
if [ ! -f target/testdata/xfs-real-delete/disk.img ] || [ ! -f target/testdata/xfs-real-delete/expected.tsv ]; then
|
|
sudo scripts/make-xfs-real-deletion.sh
|
|
fi
|
|
- name: Run tests
|
|
shell: bash
|
|
run: |
|
|
if [ "${RUNNER_OS}" = "Linux" ]; then export GUARA_REQUIRE_FIXTURES=1; fi
|
|
cargo test --workspace
|
|
|
|
audit:
|
|
name: Dependency audit
|
|
runs-on: linux-arm64
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
# rustsec/audit-check depends on GitHub's checks API. cargo-audit itself
|
|
# needs nothing but the advisory database, and installing it once into the
|
|
# persistent CARGO_HOME makes every later run skip compilation.
|
|
- name: cargo audit
|
|
run: |
|
|
command -v cargo-audit >/dev/null || cargo install cargo-audit --locked
|
|
cargo audit
|
|
|
|
gui:
|
|
name: Check desktop app (Linux)
|
|
runs-on: linux-arm64
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/guara-gui
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
- name: Tauri system dependencies
|
|
timeout-minutes: 25
|
|
run: scripts/apt-install.sh /opt/hostedtoolcache/apt-cache/tauri-native libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
|
|
- name: Generate icons
|
|
run: npx --yes @tauri-apps/cli@2 icon apps/gui/src-tauri/icons/source.png -o apps/gui/src-tauri/icons
|
|
- run: cargo check --manifest-path apps/gui/src-tauri/Cargo.toml
|
|
env:
|
|
RUSTFLAGS: ""
|