Skip to content

CI: reusable workflows, hardening - #149

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

Kinflou merged 1 commit into
mainfrom
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

  • ci.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), with targets: wasm32-wasip1 for the external-generator tests. 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.
  • 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 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 (reports used to cancel on pushes too, so a push to main now queues behind the one before it).
  • 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). dtolnay/rust-toolchain@stable became the pinned action with toolchain: 1.99.1, so the jobs agree with rust-toolchain.toml.
  • harden-runner (audit) first on VM jobs.
  • grep -rn 'apt-get\|brew install\|choco install\|curl .*| *sh' .github/ is empty.

What stayed local, and why

  • Lint (rustfmt, both clippy runs, the two fixture-crate rustfmt checks): the CI images have neither rustfmt nor clippy, and the reusable workflow doesn't run them. A VM job on the pinned 1.99.1.
  • reports.yml (size, coverage, compile time, publish): VM jobs. The size and compile reports build a release binary and the coverage report needs llvm-cov's rustup component, which the images lack. The observatory actions' own inner taiki-e/install-action@v2 is pinned inside the observatory, not here.

Things to know

  • Check names changed: Test 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 pinned core, generation, comline-rust, comline-typescript or runtime git dependency broke under 1.99.1. Cargo.lock is untouched.

Wall time (run start to finish)

before after
CI, push to main 7m59s (run 43037624214) not measured on a push yet
CI, pull request 6m14s (run 43035721876) 17m53s cold, 10m22s warm re-run
Reports, push to main 7m10s (run 43037628754) 13m42s on the pull request (size, coverage, compile)

The after figures are inflated by runner availability, not by the work. In the warm CI run the Windows job waited about four minutes for a runner and then took 4m57s; every other job finished within 3m40s of the start. Reports ran its three jobs one after another with roughly two minutes between them for the same reason. The after runs also do more than the before ones: beta, nightly and the canary are new jobs.

@Kinflou
Kinflou marked this pull request as ready for review November 11, 2026 23:19
@Kinflou
Kinflou merged commit 72e070f into main Nov 11, 2026
25 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