Commit Graph
164 Commits
Author SHA1 Message Date
Dylan M. Taylor 0ed80a2122 fix(freebsd): validate aarch64 pkg-config paths 2026-11-14 23:23:30 +00:00
Dylan M. Taylor d0e829bfdb fix(freebsd): extract linked packages into aarch64 sysroot 2026-11-14 23:08:28 +00:00
Dylan M. Taylor 6c02f8de2a ci(freebsd): install WebKitGTK and libsoup dependencies (#237)
* ci(freebsd): install WebKitGTK and libsoup dependencies

* fix(freebsd): install WebKitGTK in release workflow
2026-11-14 17:58:48 -05:00
FredApps 9f9f16987c ci: never cancel a running main-branch Sonar scan (#151)
* ci: preserve every main-branch Sonar scan

* ci: never cancel a running main Sonar scan, as the app repos do

Per-run concurrency groups let main scans run side by side, so an older
commit's analysis can reach SonarCloud after a newer one. Keep one group
per ref and only stop cancelling on main, matching every app repo's
sonarcloud.yml.
2026-11-14 21:38:10 +01:00
FredApps f76646c68b Merge pull request #198 from storytold/ci/opt-in-sccache
gate: opt-in sccache; sonarcloud: free disk space in the background in the archive build
2026-11-13 22:08:20 +01:00
FredApps debd222436 Merge pull request #155 from storytold/fix/house-rules-preserve-local-text
Preserve local instructions when updating house rules
2026-11-13 21:24:00 +01:00
FredApps cb96afc6e2 Merge pull request #229 from storytold/sonarcloud/bin-exe-paths
sonarcloud: let shard tests find workspace binaries by their build path
2026-11-13 21:10:36 +01:00
FredApps bc67c8a00c Merge branch 'main' into ci/opt-in-sccache
# Conflicts:
#	.github/workflows/gate.yml
#	README.md
2026-11-13 20:46:39 +01:00
FredApps ce1d914f7c Merge branch 'main' into fix/house-rules-preserve-local-text 2026-11-13 20:42:47 +01:00
Dylan M. Taylor 7e30ba4fdf fix(sonar): prefetch locked test dependencies 2026-11-13 14:50:09 +00:00
FredApps 00db6e35c0 sonarcloud: let shard tests find workspace binaries by their build path
Tests that run a workspace binary through env!("CARGO_BIN_EXE_<name>")
hold the build job's absolute target path. nextest extracts the archive
to a temporary directory, so in every coverage shard those tests failed
with "No such file or directory" while the gate passed them. Since #222
made shard test failures fail the scan, that turned SonarCloud red on
designcraft, cadcraft, pdfcraft and wordcraft main.

The build job now records cargo's target directory next to the archive.
Each shard extracts the archive to a known directory and links the
recorded path to it before running its partition.
2026-11-13 15:24:29 +01:00
FredApps 7d19a7f5e4 release.yml: a publish input publishes a complete draft at the end of the run (#209)
* release.yml: a publish input publishes a complete draft at the end of the run

Part E of the faster-release plan: no one waits by the run to publish. Only on the release
branch, not in a dry run, only when no build job failed (the job already requires that) or was
cancelled, and only when the draft has at least as many assets as the last published release, so
a skipped build job can't publish an incomplete release. Off by default; apps opt in.

* publish: compare with the most recently published release, and say why in the summary

gh release list orders by creation, so the newest-created release was the baseline; an older
draft published later would have been missed. Every refusal now also writes its reason to the
job summary, not only an error annotation.

* tests: publish doesn't change the FreeBSD build, so it stays out of the cache key
2026-11-13 14:09:41 +01:00
Dylan M. Taylor 174ac23ed6 fix(sonar): fail on instrumented Rust test errors 2026-11-13 12:57:30 +00:00
Dylan M. Taylor 6a0e2fae07 fix(sonar): fail after coverage generation errors 2026-11-13 12:51:55 +00:00
FredAppsandFredApps 20ebee3cb1 fix(ci): provide pinned translations to coverage tests (#227)
* fix(ci): provide pinned translations to coverage tests

* fix(ci): keep translation checkout out of scan

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-13 00:33:06 -05:00
6854e6fb87 ci: show coverage test failures in shard summaries (#177)
Co-authored-by: skylartaylor <skylartaylor@users.noreply.github.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-12 22:03:24 -05:00
Dylan M. Taylor fd88e26a87 feat(gate): support caller setup commands (#224) 2026-11-12 21:51:38 -05:00
FredApps 804f702057 fix(sonar): surface archived Rust test failures after analysis (#222)
* fix(sonar): report archived Rust test failures after scanning

* test(sonar): cover shard status production and document result semantics
2026-11-12 23:38:33 +01:00
FredApps 293de72429 release.yml: a FreeBSD cache a later release can restore, with the aarch64 cross output (#216)
The release FreeBSD jobs keyed their Cargo cache on toJSON(inputs), and
contributors-artifact is contributor-snapshot-<run id>-<attempt>, so every run
wrote an entry no other run could restore: on 11 Nov every release built FreeBSD
cold. The key now holds only the inputs that change the FreeBSD build (app name,
architecture, craft-fonts ref, FreeBSD release); dry-run is left out too, so a dry
run warms the cache a release restores. A test makes every new input pick a side.

The aarch64 job cross-compiles, and Cargo writes that output to
target/aarch64-unknown-freebsd/release, which the cache action never saved: only
the host build scripts in target/release were kept. The action takes the triple as
a new target input and saves and restores that directory too.
2026-11-12 07:25:29 +01:00
FredApps 17eb0f0717 release.yml: build Windows arm64 natively on the windows-11-arm runner (#215) 2026-11-12 07:25:20 +01:00
Dylan M. Taylor 7eb307b465 egress: allow motd.ubuntu.com, esm.ubuntu.com and *.amazontrust.com:80 (#218)
Ubuntu's MOTD news and Ubuntu Pro (ESM) hooks reach motd.ubuntu.com and
esm.ubuntu.com; TLS revocation checks for Amazon-issued certificates go
to *.amazontrust.com over plain HTTP. Every Harden-Runner allow list now
names them.
2026-11-11 20:32:55 -05:00
FredApps 3951f6df01 sonarcloud: merge each shard's profiles before the scan downloads them (#210)
Each coverage shard now merges its own raw profiles into one sparse
.profdata with the archive toolchain's llvm-profdata and uploads only
that. The scan job merges the shard profiles instead of downloading
every raw profile beside the test archive, which on 11 Nov 2026 filled
the runner for vectorcraft (four ~7 GB zipped profraw artifacts).

A raw profile llvm-profdata cannot read, such as one cut short by a
test process that crashed while writing it (lightcraft, 11 Nov 2026),
now fails its shard with an error naming the file, instead of being
uploaded and failing the scan's merge.

Single-shard callers keep the cargo llvm-cov path unchanged.
2026-11-11 19:55:14 -05:00
Dylan M. Taylor ae29fbc6ec fix(sonarcloud): explicitly allow Ubuntu ESM HTTPS egress (#217) 2026-11-11 19:25:34 -05:00
FredApps 603045e42d release.yml: a dry-run input builds and checks without releasing (#208)
* release.yml: a dry-run input builds and checks without releasing

For a nightly run on main that finds release-only breakage before release day. On 11 Nov 2026
gridcraft's riscv64 build, materialcraft's private-repo FreeBSD jobs, wordcraft's Print job and
the riscv64 apt mirrors each surfaced only during the release, one fix PR and release run at a
time. With dry-run: no job enters the release environment (no signing secrets; the environment
admits only the release branch), the macOS job and the draft are skipped, and the Flatpak OCI
layouts are not pushed to GHCR or Docker Hub.

* tests: the Flatpak OCI push and the release environment also stay out of a dry run
2026-11-11 22:46:06 +01:00
Dylan M. Taylor 15058dc71e ci: use StepSecurity's maintained actions (#206)
* ci: use StepSecurity's maintained actions

Each third-party action that StepSecurity publishes a secure drop-in
replacement for now uses that replacement, pinned to a commit with its
version as a comment. Versions follow what we used: the newest
StepSecurity release in the same major, or the closest major they
publish. dtolnay/rust-toolchain refs that named a toolchain (stable,
nightly, 1.76) become the replacement's `toolchain` input.

* tests: find the FreeBSD VM, SonarCloud scan and install-action steps by their StepSecurity names
2026-11-11 14:55:40 -05:00
Dylan M. Taylor 693c8dd084 sonarcloud: honour each repository's own sonar.cpd.exclusions (#205)
* sonarcloud: honour each repository's own sonar.cpd.exclusions

* sonarcloud: read sonar.cpd.exclusions with properties syntax and allow the ? wildcard
2026-11-11 14:42:26 -05:00
Dylan M. Taylor 95e8d67389 egress: allow *.kernel.org and *.dotsrc.org wherever apt mirrors are allowed (#203)
Block-mode Harden-Runner still flagged apt's lookups under these zones
(_https._tcp.mirrors.edge.kernel.org, _https._tcp.mirrors.dotsrc.org),
and apt failures are breaking CI across the org. Allow the whole zones on
443 next to the existing mirror hosts.
2026-11-11 11:20:38 -05:00
FredApps 3f541b8904 install-riscv64-cross: fall back to mirrors outside ubuntu.com (#202)
The release builds' Linux riscv64 job read amd64 from archive and
security.ubuntu.com and riscv64 from ports.ubuntu.com only. With no
ubuntu.com name resolving on the runners, apt spent 3m20s on failed
lookups and then found no libc6-dev:riscv64, so every app's release
failed there.

select-mirrors.sh now chooses one pair of mirrors for both architectures:
Ubuntu's own, then dotsrc (it carries both trees), then kernel.org with
TU Chemnitz's ports. It takes the first pair whose amd64 and riscv64
InRelease files answer for every suite with the same Date (Ubuntu signs
one Release for archive and ports), so Multi-Arch: same packages still
match. The image's own Ubuntu sources are disabled in that job: they
only added a second, lagging snapshot and, during the outage, the stall.

The riscv64 job runs Harden-Runner in audit mode, so release.yml needs
no allowlist change.
2026-11-11 17:01:34 +01:00
FredApps 0817d766c4 test-freebsd: show apt's view and the CPU when the package install fails (#201)
One run on 11 Nov 2026 found no candidate for tcsh or debsigs right after
an update that fetched every index from kernel.org; the runs before and
after it, under the same ubuntu.com outage, passed. Print apt-cache policy,
the architecture settings, the universe index files and whether the CPU
supports x86-64-v3, so the next failure shows the cause.
2026-11-11 16:36:11 +01:00
Dylan M. Taylor 3d49e352fa apt: stop SRV lookups; give the FreeBSD VM host the fallback mirrors (#200)
Harden-Runner blocked apt's SRV lookups (_https._tcp.mirrors.edge.kernel.org,
_https._tcp.mirrors.dotsrc.org): the allow lists name the hosts, not their
SRV records. configure-apt-mirrors now sets Acquire::EnableSrvRecords false;
apt connects to the hosts directly either way.

The FreeBSD workflow's VM action apt-installs QEMU on the host, which failed
during the ubuntu.com outage (sudo exit 100) and reached packages.microsoft.com.
Run configure-apt-mirrors first and drop the image's Microsoft source, which
the job never installs from.
2026-11-11 10:26:48 -05:00
FredApps d97dcd6dcf apt: fall back to mirrors outside ubuntu.com when it is down (#199)
On 11 Nov 2026 no ubuntu.com name resolved on the runners for about
half an hour. The images' mirror list (azure.archive, archive and
security.ubuntu.com) sits entirely in that zone, so every retry spent
its five minutes on 20-second lookups of the same dead names and the
SonarCloud archive builds failed with "downloading the packages failed
3 times".

configure-apt-mirrors points the image's Ubuntu sources at
/etc/apt/craft-apt-mirrors.txt: the image's mirrors in the image's
order, then mirrors.edge.kernel.org and mirrors.dotsrc.org (arm:
mirrors.dotsrc.org and ftp.tu-chemnitz.de). Each mirror is checked
first, in parallel; those that do not serve this release's InRelease
move to the end. install-apt-packages runs it before every network
attempt, and the plain apt-get steps (Flatpak, release, packaging lint,
RPM signing, Linux deps, FreeBSD test) run it before apt-get update.
Block-mode Harden-Runner lists allow the new hosts.
2026-11-11 16:21:03 +01:00
FredAppsandClaude Opus 5.5 e59a0c94ab gate: key sccache's cache on Cargo.toml and build.rs only
clippy records clippy.toml in its dep-info, so sccache already sees it.
The one setting sccache leaves out is --check-cfg, declared in Cargo.toml
lints and build scripts. Correct the comment and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:57:21 +01:00
FredAppsandClaude Opus 5.5 89b1e8c6ba gate: start sccache's cache afresh when lint settings change
sccache v0.18.0 leaves --check-cfg out of its key on purpose, and a
cached clippy-driver run doesn't see clippy.toml, so a cached compile
replays the warnings it had. The cache's version (SCCACHE_GHA_VERSION)
now comes from cache-version and a hash of every Cargo.toml, build.rs
and clippy.toml, unless the caller sets it.

The README also says what sccache can't see: files a procedural macro
reads without rustc tracking them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:56:50 +01:00
FredAppsandClaude Opus 5.5 f4d0962352 sonarcloud: free disk space in the background in the archive build
As gate.yml does: the build starts at once and the space is free before
it needs it. The scan job's cleanup is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:44:07 +01:00
FredAppsandClaude Opus 5.5 9746d75ce5 gate: opt-in sccache for the workspace's own crates
rust-cache keeps dependencies but not the workspace's crates, so every
gate run compiles all of them again. With `sccache: true` the gate wraps
rustc in sccache over the GitHub Actions cache. It writes where the
dependency cache saves (the default branch, opted-in dispatches) and
only reads elsewhere; SCCACHE_GHA_RW_MODE in `env` overrides that.

Off by default, so no caller changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:44:07 +01:00
Dylan M. Taylor 91e2c76173 sonarcloud: opt-in SQLX_OFFLINE and extra cargo features for the coverage build (#195) 2026-11-10 23:08:00 -05:00
Dylan M. Taylor 0588474894 sonarcloud: optional JavaScript/TypeScript coverage (#194)
* sonarcloud: optional JavaScript/TypeScript coverage (node-coverage-script)

* sonarcloud: scan after failing JS/TS tests, then fail the job
2026-11-10 22:29:06 -05:00
Dylan M. Taylor 644a5d76b9 ci: harden workflows with credential isolation, template injection defenses, and dependabot cooldown (#191)
* ci: harden workflows with credential isolation, template injection defenses, and dependabot cooldown

- Add persist-credentials: false across all actions/checkout invocations
- Eliminate template injection by mapping matrix and input variables to env: in freebsd.yml, release.yml, and sonarcloud.yml
- Add 7-day cooldown to dependabot.yml to protect against supply-chain compromise of recently published releases
- Update test suite to validate hardened environment mappings

* ci: allow static.crates.io and registry endpoints in gate and windows-arm64 runners
2026-11-10 18:07:38 -05:00
FredApps 567530acb5 Merge branch 'main' into sonar/docker-build-job-permissions 2026-11-10 18:23:14 +01:00
FredApps b24513e795 fix(freebsd): cap the VM's ZFS ARC so big test crates aren't OOM-killed (#190)
* fix(freebsd): give the VM a swap file and cap the ZFS ARC

photocraft's FreeBSD job was SIGKILLed compiling photocraft-ui-egui's lib tests late in the run (release run 42609972735, dispatch 42805955303). Add an 8 GB swap file when the guest has none, cap the ARC at 2 GB when the image uses ZFS, and print disk, swap and memory so the next OOM is diagnosable.

* fix(freebsd): only touch swap and the ARC inside a FreeBSD guest

The workflow tests run the prepare script on Linux under sh -eu, where swapctl doesn't exist. Run the ARC cap, swap file and diagnostics only when uname is FreeBSD, and don't let the diagnostics fail the step.

* fix(freebsd): add the swap file only with room to spare, and remove a partial one

Per review: a dd that runs out of space must not leave a partial /var/swap0 that then starves the build. Require 16 GB free on /var first and delete the file if any step fails.

* fix(freebsd): keep only the ZFS ARC cap; drop the swap-file fallback

Per review: swap on a ZFS-backed file can hang FreeBSD under memory pressure, and today's image already has a swap partition, so the fallback never ran. The verified run passed on the ARC cap alone.
2026-11-10 16:40:36 +01:00
Dylan M. Taylor 969c32dcf2 ci: allow SonarCloud S3 analysis sensor cache and scanner data endpoints 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 0912de799d ci: expand allowed-endpoints with wildcard domains for APT, GPG, and PyPI 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 21875aea67 ci: add GPG keyservers to sonarcloud.yml allowed-endpoints 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 2edf8b6175 ci: address review findings for Harden-Runner egress policy
- Add allowed-endpoints to ast-grep.yml matching test-ast-grep.yml
- Add pypi.org and files.pythonhosted.org to sonarcloud.yml for Python coverage
- Add packages.microsoft.com:443 and https mirrors to apt allowed-endpoints
- Set unvalidated reusable workflows (release, docker-build, gate, etc.) to audit mode
2026-11-10 08:26:20 -05:00
Dylan M. Taylor 9e571bd658 ci: add allowed-endpoints to packaging-lint and house-rules workflows 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 5a43790c93 ci: replace anchore/sbom-action with step-security/sbom-action
Switch to the StepSecurity-maintained secure drop-in replacement
pinned to v0.24.2 (28bb7d0d2869c9ab0e5571c93591747945819d39).
2026-11-10 08:26:20 -05:00
Dylan M. Taylor df5f1fef9a ci: specify allowed-endpoints for block mode in workflows 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 80cb1d6a31 ci: switch Harden-Runner egress-policy to block mode 2026-11-10 08:26:20 -05:00
Dylan M. Taylor 83e81167c6 ci: add StepSecurity Harden-Runner to every workflow job
Adds step-security/harden-runner (v2.22.4, SHA-pinned) as the first step of
every job in the reusable and repo workflows, in egress-policy: audit mode.
Audit mode only records network, file and process activity; it blocks nothing.
Unsupported environments (containers, FreeBSD VM guests, ubuntu-slim) are
skipped by the action itself. Dependabot's github-actions group keeps the pin
current.
2026-11-10 08:26:20 -05:00
FredApps 1a6c6c0dd5 fix(docker-build): scope packages: write to the pushing jobs 2026-11-10 11:10:27 +01:00