Skip to content

CI: reusable workflows, CI images, hardening - #133

Merged
Kinflou merged 1 commit into
masterfrom
ci-hardening
Nov 11, 2026
Merged

Kinflou merged 1 commit into
masterfrom
ci-hardening

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of the CI overhaul for this repository, following core#257 and runtime#120.

What moved

  • build_test.yml: the copied stable job and the Windows/macOS/arm matrix are replaced by the reusable rust-ci.yml (ComlineProject/.github at 797d473, SHA-pinned). It runs the stable/beta/nightly matrix on ubuntu-24.04, stable on ubuntu-24.04-arm, macos-15 and windows-2025, and a stable canary on ubuntu-26.04 that may fail without failing the run.
  • The wasm job now runs in the ci-wasm image (by digest), so rustup update and rustup target add are gone.
  • lint.yml (new) calls the reusable lint (actionlint and the Renovate config check); renovate.json (new) extends github>ComlineProject/.github:renovate-config.
  • rust-toolchain.toml (new): exact 1.99.1, the version the CI images carry. The reusable matrix sets RUSTUP_TOOLCHAIN, which overrides the file.

Hardening, every workflow

  • Pinned runner labels (ubuntu-24.04, macos-15, windows-2025), no -latest.
  • Top-level permissions: contents: read; contents: write only on the reports publish job.
  • persist-credentials: false on every checkout except the one in publish, which pushes.
  • Concurrency keyed on workflow and ref, cancelling in-progress runs on pull requests only.
  • timeout-minutes on every job.
  • Every uses: pinned to a 40-hex SHA with a version comment (the same SHAs as core, including the observatory actions).
  • harden-runner (audit) first on VM jobs. Not on the wasm container job, where it does not work.
  • grep -rn 'apt-get\|brew install\|choco install\|curl .*| *sh' .github/ is empty.

What stayed local, and why

  • wasm (comline-codegen for wasm32-wasip1 and wasm32-unknown-unknown, plus the two renderer binaries): the reusable workflow has no per-package wasm builds, so it stays a local job, in the wasm image.
  • reports.yml (coverage and publish): VM jobs, because llvm-cov needs rustup components the images don't have. The observatory actions' own inner taiki-e/install-action@v2 is pinned inside the observatory, not here.

Things to know

  • Check names changed: Rust project - stable and test (<os>) are now rust / test (stable) and rust / test (<os>), and so on. If branch protection requires the old names, it needs updating (I changed no settings).
  • Beta, nightly and the 26.04 canary are new checks for this repository. They pass here.
  • No bench or fuzz workflows exist in this repository, so none were added.
  • No git dependency broke under 1.99.1.

Wall time (run start to finish)

before after
Cargo Build & Test, push to master 2m43s (run 43037552663) 3m51s on the branch push (cold cache)
Cargo Build & Test, pull request 3m54s (run 43034873438) 7m30s cold, 3m38s warm re-run
Reports (coverage), pull request not run on PRs before 1m02s

The after runs do more: beta, nightly and the canary are added, and the slowest job is the cold Windows build. Warm, the pull request run is about the same as before while covering that extra work.

@Kinflou
Kinflou marked this pull request as ready for review November 11, 2026 23:19
@Kinflou
Kinflou merged commit 0aabe67 into master Nov 11, 2026
33 checks passed
@Kinflou
Kinflou deleted the ci-hardening branch November 11, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant