Files
tsunagi/.github/workflows/ci.yml
T
Aleksandr Bogomiakov a1da4bf498 Restore workspace checks on GitHub Actions
Install the GTK and Ayatana development packages in every Linux job that builds the tray. Check the core package explicitly in the library-only job. The peer exchange and WireGuard examples no longer exist. Their scenarios are integration tests in the workspace. Keep those tests and smoke-test the shipped tsng binary.

Open the Windows log-rotation fixture with write access when extending it. An append-only handle cannot set EOF on Windows. Verify the rotated file retains its full length. Remove public rustdoc links to private or platform-specific items while keeping warnings fatal.

Verified 697 workspace tests on Linux ARM64 and 668 on macOS. Formatting, Clippy, rustdoc with warnings denied, the core-only check and the CLI smoke test passed. Linux also passed the Rust 1.91.0 workspace check and the Debian upgrade-order fixture. No native Windows runner was available locally.
2026-11-26 02:24:36 +02:00

86 lines
2.6 KiB
YAML

name: CI
on:
push:
branches: [master, main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
# The default test set must not need the internet, a DHT, a public relay,
# administrator rights or changes to OS network settings.
RUST_BACKTRACE: 1
jobs:
check:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- &linux-tray-deps
name: Install GTK and AppIndicator development files
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libgtk-3-dev libayatana-appindicator3-dev
- run: cargo fmt --all -- --check
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
- name: Check Debian release candidate upgrade ordering
run: bash dist/deb/test-deb.sh
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- *linux-tray-deps
- name: Test the workspace, including peer exchange and WireGuard integration
run: cargo test --locked --workspace --all-targets
- name: Start the command line client
run: cargo run --locked --bin tsng -- --version
# The library must keep building without the command line binary and
# without interface support, for embedders that want neither.
no-default-features:
name: library only
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --locked -p tsunagi-core --no-default-features --lib
docs:
name: rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- *linux-tray-deps
- run: cargo doc --locked --workspace --no-deps
env:
RUSTDOCFLAGS: -D warnings
msrv:
name: minimum supported Rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.91.0
- uses: Swatinem/rust-cache@v2
- *linux-tray-deps
- run: cargo check --locked --workspace --all-targets