From eaea3d49f7c5ce03ddace3830600e5ca9e7bc354 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Sat, 12 Sep 2026 01:30:16 -0400 Subject: [PATCH 1/4] ci(release): apt retries on IPv4; never skip the publish job Concurrent dind rust containers looped on apt InRelease; abort and retry with ForceIPv4. Publish always runs after version so cleanup is not blocked by Forgejo act "'runs-on' key not defined" on a skipped job. Do not bake a custom rust image on this card. --- .forgejo/workflows/release.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 9d85b77..378fc90 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -38,6 +38,8 @@ concurrency: env: CARGO_TERM_COLOR: never RUST_IMAGE: rust:1.91-bookworm + # Not baking pkg-config/libssl-dev into a custom image on this card — + # dind PVC would make that the durable fix for the apt loop. Filed separately. CARGO_REGISTRY_VOLUME: onionwire-cargo-registry jobs: @@ -173,8 +175,8 @@ jobs: -w /src \ "$RUST_IMAGE" \ sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \ - && apt-get update \ - && apt-get install -y --no-install-recommends pkg-config libssl-dev \ + && apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true update \ + && apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true install -y --no-install-recommends pkg-config libssl-dev \ && cargo build --release --locked \ && strip /target/release/onionwire \ && ls -l /target/release/onionwire' @@ -256,8 +258,8 @@ jobs: -w /src \ "$RUST_IMAGE" \ sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \ - && apt-get update \ - && apt-get install -y --no-install-recommends pkg-config libssl-dev \ + && apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true update \ + && apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true install -y --no-install-recommends pkg-config libssl-dev \ && cargo build --release --locked \ && strip /target/release/onionwire \ && ls -l /target/release/onionwire' @@ -292,21 +294,36 @@ jobs: publish: needs: [version, aarch64, x86_64] - if: needs.version.outputs.dry_run != 'true' + # Always run after version so cleanup can need this job without Forgejo + # act dying on "'runs-on' key not defined" for a skipped publish. + if: always() && needs.version.result == 'success' runs-on: docker-amd64 timeout-minutes: 20 steps: + - name: Skip publish on dry_run + if: needs.version.outputs.dry_run == 'true' + run: echo "dry_run not publishing" + + - name: Fail closed if a build failed + if: needs.version.outputs.dry_run != 'true' && (needs.aarch64.result != 'success' || needs.x86_64.result != 'success') + run: | + echo "aarch64=${{ needs.aarch64.result }} x86_64=${{ needs.x86_64.result }}" >&2 + exit 1 + - name: Checkout CI tooling + if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success' uses: https://code.forgejo.org/actions/checkout@v4 with: path: .ci-tools - name: Download both arch artifacts + if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success' uses: https://code.forgejo.org/actions/download-artifact@v3 with: path: artifacts - name: Publish both binaries to one release + if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success' env: FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} REPO_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }} From ae9cd5728e25da5187308f2cefd556f6dbca1e81 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Sat, 12 Sep 2026 01:35:13 -0400 Subject: [PATCH 2/4] ci(release): do not mint a release for workflow-only edits Drop release.yml and build-release-local.sh from on.push.paths so a CI tweak cannot cut a user-facing tag. Validate those files with dry_run dispatch instead. release-body.md stays because it is the published body. --- .forgejo/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 378fc90..59ce3f4 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -13,8 +13,6 @@ on: - "crates/**" - "Cargo.toml" - "Cargo.lock" - - ".forgejo/workflows/release.yml" - - "scripts/build-release-local.sh" - "scripts/release-body.md" workflow_dispatch: inputs: From ad8b43c36c19e34e7e87538d92dd2f85b00da58c Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Sat, 12 Sep 2026 01:39:41 -0400 Subject: [PATCH 3/4] ci: skip cargo suite when the change cannot affect Rust Path allowlist on push-to-main and pull_request: src/, crates/, tests/, Cargo.toml, Cargo.lock, and this workflow. workflow_dispatch still always runs. No branch protections, so a skipped run is not a merge trap. --- .forgejo/workflows/ci.yml | 19 +++++++++++++++++++ README.md | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e4690a9..4c7b8aa 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -2,10 +2,29 @@ name: ci # Tests and clippy run on the Pi runner (aarch64) inside a rust container, so # this CI proves the aarch64 build too. Jobs use the runner's `docker` label. +# +# Path allowlist: skip the cargo job when the change cannot affect the Rust +# build (docs, android, scripts, sibling workflows, markdown). No required +# status checks on main, so a missing run is not a merge trap. +# workflow_dispatch has no path filter — it always runs the suite. on: push: branches: [main] + paths: + - "src/**" + - "crates/**" + - "tests/**" + - "Cargo.toml" + - "Cargo.lock" + - ".forgejo/workflows/ci.yml" pull_request: + paths: + - "src/**" + - "crates/**" + - "tests/**" + - "Cargo.toml" + - "Cargo.lock" + - ".forgejo/workflows/ci.yml" workflow_dispatch: # One cargo job on the Pi at a time. Overlapping PR+main runs shared the diff --git a/README.md b/README.md index 562ec3e..fa13334 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ FORGEJO_TOKEN= scripts/build-release-local.sh vX.Y.Z Workflows (Forgejo Actions, `.forgejo/workflows/`): -- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs (ignored Tor-live tests are not run). Pi runner, `docker` label. +- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs when `src/`, `crates/`, `tests/`, `Cargo.toml`, `Cargo.lock`, or this workflow change (ignored Tor-live tests are not run). `workflow_dispatch` always runs the suite. Pi runner, `docker` label. - [`.forgejo/workflows/release.yml`](.forgejo/workflows/release.yml) — on core paths to `main`: next tag, aarch64 (`docker`) + x86_64 (`docker-amd64`), one release. `workflow_dispatch` rebuilds a tag or `dry_run`s. Concurrency group `onionwire-release` (separate from CI). Scripts: From 1218869629b42ae3d28c9650f7cc3af27569f4d4 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Sat, 12 Sep 2026 01:39:41 -0400 Subject: [PATCH 4/4] ci: skip cargo suite when the change cannot affect Rust Path allowlist on push-to-main and pull_request: src/, crates/, tests/, Cargo.toml, Cargo.lock, and this workflow. workflow_dispatch still always runs. No branch protections, so a skipped run is not a merge trap. --- .forgejo/workflows/ci.yml | 19 +++++++++++++++++++ README.md | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e4690a9..4c7b8aa 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -2,10 +2,29 @@ name: ci # Tests and clippy run on the Pi runner (aarch64) inside a rust container, so # this CI proves the aarch64 build too. Jobs use the runner's `docker` label. +# +# Path allowlist: skip the cargo job when the change cannot affect the Rust +# build (docs, android, scripts, sibling workflows, markdown). No required +# status checks on main, so a missing run is not a merge trap. +# workflow_dispatch has no path filter — it always runs the suite. on: push: branches: [main] + paths: + - "src/**" + - "crates/**" + - "tests/**" + - "Cargo.toml" + - "Cargo.lock" + - ".forgejo/workflows/ci.yml" pull_request: + paths: + - "src/**" + - "crates/**" + - "tests/**" + - "Cargo.toml" + - "Cargo.lock" + - ".forgejo/workflows/ci.yml" workflow_dispatch: # One cargo job on the Pi at a time. Overlapping PR+main runs shared the diff --git a/README.md b/README.md index 562ec3e..fa13334 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ FORGEJO_TOKEN= scripts/build-release-local.sh vX.Y.Z Workflows (Forgejo Actions, `.forgejo/workflows/`): -- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs (ignored Tor-live tests are not run). Pi runner, `docker` label. +- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs when `src/`, `crates/`, `tests/`, `Cargo.toml`, `Cargo.lock`, or this workflow change (ignored Tor-live tests are not run). `workflow_dispatch` always runs the suite. Pi runner, `docker` label. - [`.forgejo/workflows/release.yml`](.forgejo/workflows/release.yml) — on core paths to `main`: next tag, aarch64 (`docker`) + x86_64 (`docker-amd64`), one release. `workflow_dispatch` rebuilds a tag or `dry_run`s. Concurrency group `onionwire-release` (separate from CI). Scripts: