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.
This commit is contained in:
1 parent
9920d4c10f
commit
a1da4bf498
5 files changed
+24
-13
No files matched your search
@@ -23,6 +23,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
- uses: Swatinem/rust-cache@v2
|
- 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 fmt --all -- --check
|
||||||
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
|
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
|
||||||
- name: Check Debian release candidate upgrade ordering
|
- name: Check Debian release candidate upgrade ordering
|
||||||
@@ -39,11 +45,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo test --locked --workspace --all-targets
|
- *linux-tray-deps
|
||||||
- name: run the examples
|
- name: Test the workspace, including peer exchange and WireGuard integration
|
||||||
run: |
|
run: cargo test --locked --workspace --all-targets
|
||||||
cargo run --locked --example two_agents
|
- name: Start the command line client
|
||||||
cargo run --locked --example wireguard_mesh
|
run: cargo run --locked --bin tsng -- --version
|
||||||
|
|
||||||
# The library must keep building without the command line binary and
|
# The library must keep building without the command line binary and
|
||||||
# without interface support, for embedders that want neither.
|
# without interface support, for embedders that want neither.
|
||||||
@@ -54,7 +60,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo check --locked --no-default-features --lib
|
- run: cargo check --locked -p tsunagi-core --no-default-features --lib
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: rustdoc
|
name: rustdoc
|
||||||
@@ -63,6 +69,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- *linux-tray-deps
|
||||||
- run: cargo doc --locked --workspace --no-deps
|
- run: cargo doc --locked --workspace --no-deps
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: -D warnings
|
RUSTDOCFLAGS: -D warnings
|
||||||
@@ -74,4 +81,5 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@1.91.0
|
- uses: dtolnay/rust-toolchain@1.91.0
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- *linux-tray-deps
|
||||||
- run: cargo check --locked --workspace --all-targets
|
- run: cargo check --locked --workspace --all-targets
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
//! One of the per-platform adapters; see [`super`]. It provides only what is
|
//! One of the per-platform adapters; see [`super`]. It provides only what is
|
||||||
//! particular to a Unix socket — binding a listener, connecting a client, and
|
//! particular to a Unix socket — binding a listener, connecting a client, and
|
||||||
//! the owner-only permissions — and hands every accepted connection to the
|
//! the owner-only permissions — and hands every accepted connection to the
|
||||||
//! shared [`serve_connection`](super::serve_connection). The request framing,
|
//! shared connection handler. The request framing,
|
||||||
//! the dispatch and the client wrappers are the same on every platform and
|
//! the dispatch and the client wrappers are the same on every platform and
|
||||||
//! live in [`super`], re-exported here so `ipc::unix::request_status` and its
|
//! live in [`super`], re-exported here so `ipc::unix::request_status` and its
|
||||||
//! siblings keep resolving.
|
//! siblings keep resolving.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
//! A named-pipe adapter for the local control interface.
|
//! A named-pipe adapter for the local control interface.
|
||||||
//!
|
//!
|
||||||
//! The Windows counterpart of [`super::unix`]. It provides only what is
|
//! The Windows counterpart of the Unix socket adapter. It provides only what is
|
||||||
//! particular to a named pipe — creating the server instance, opening a client
|
//! particular to a named pipe — creating the server instance, opening a client
|
||||||
//! and turning the state directory path into a pipe name — and hands every
|
//! and turning the state directory path into a pipe name — and hands every
|
||||||
//! accepted connection to the shared [`serve_connection`](super::serve_connection).
|
//! accepted connection to the shared connection handler.
|
||||||
//! The framing, the dispatch and the client wrappers are the same on every
|
//! The framing, the dispatch and the client wrappers are the same on every
|
||||||
//! platform and live in [`super`], re-exported here so `ipc::windows::request_status`
|
//! platform and live in [`super`], re-exported here so `ipc::windows::request_status`
|
||||||
//! and its siblings resolve just as their Unix equivalents do.
|
//! and its siblings resolve just as their Unix equivalents do.
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ fn firewall_todo(plan: &BroadcastRulesPlan) -> String {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The macOS implementation: `route` for the route, no firewall yet, and
|
/// Installs macOS broadcast routes with `route` and manages exit routing with
|
||||||
/// `pf` plus `route` for exit nodes (see [`super::macos_exit`]).
|
/// `pf` and `route`.
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct MacosHostRules {
|
pub struct MacosHostRules {
|
||||||
/// The PF reference and the physical routes owned by this agent.
|
/// The PF reference and the physical routes owned by this agent.
|
||||||
|
|||||||
@@ -6357,14 +6357,17 @@ mod service_log_tests {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let big = std::fs::File::options()
|
let big = std::fs::File::options()
|
||||||
.append(true)
|
.write(true)
|
||||||
.open(logs.join("tsng.log"))
|
.open(logs.join("tsng.log"))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
big.set_len(SERVICE_LOG_LIMIT + 1).unwrap();
|
big.set_len(SERVICE_LOG_LIMIT + 1).unwrap();
|
||||||
drop(big);
|
drop(big);
|
||||||
let file = open_log_in(&logs).unwrap();
|
let file = open_log_in(&logs).unwrap();
|
||||||
assert_eq!(file.metadata().unwrap().len(), 0);
|
assert_eq!(file.metadata().unwrap().len(), 0);
|
||||||
assert!(logs.join("tsng.log.old").exists());
|
assert_eq!(
|
||||||
|
std::fs::metadata(logs.join("tsng.log.old")).unwrap().len(),
|
||||||
|
SERVICE_LOG_LIMIT + 1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in new issue
Block a user