Repository navigation
CI hardening: reusable workflows, CI images, pinned actions, lint and Renovate - #157
Merged
Merged
Conversation
…mages The Rust matrix is the reusable rust-ci.yml, the wasm build runs in the CI wasm image and the valgrind count in the CI bench image (no apt install), every action is pinned by SHA, tokens are read-only except in the jobs that push, and the reports and nightly workflows split their publish and issue steps into jobs of their own. Adds lint.yml, renovate.json and an exact rust-toolchain.toml (1.99.1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of the org CI overhaul (same pattern as core#257 and runtime#120). Draft; no settings changed.
What moved
rust_xpandbuild_and_testare the org's reusablerust-ci.yml(stable, beta, nightly on ubuntu-24.04; stable on ubuntu-24.04-arm, macos-15, windows-2025; a non-blocking ubuntu-26.04 canary).cargo run -p xtask -- --checkcan't run after the tests there, so it is the reusable'sextra-setuphook: it runs in every job before the build, so it stays checked on every platform, and it builds the dependencies the build then reuses. No--locked: the repository doesn't commit a Cargo.lock.ci-wasmimage, with rust-cache.bench.yml): thecountshards run in theci-benchimage, so valgrind comes from the image (3.24) and not fromapt-get install. No apt, brew, choco orcurl | shis left in.github/.actions/setup-node, exact versions (20.20.2, 22.23.5; the bench keeps 22.23.4, see below),cache: npmkeyed on the lockfiles. The Rust reference and CLI installs usedtolnay/rust-toolchainat 1.99.1 instead ofrustup update stable.lint.ymlcalls the reusable lint withrenovate-config: renovate.json(groupci-lint-..., notlint-...).renovate.jsonextendsgithub>ComlineProject/.github:renovate-config; the preset already has npm on (config:recommended, one grouped lockfile-only PR), so nothing was added.rust-toolchain.toml: exact 1.99.1. Nocargo updatewas run, and the pinned core and generation git revisions build under 1.99.1 (therustandwasip1jobs are green).What stayed local, and why
cargo benchon base and head, a report script speaking--targets). This repository's bench is valgrind/callgrind over Node running the TypeScript runtime, sharded, with no base to compare. It keeps its own workflow and uses the image for valgrind only.ci-benchhas none and I did not add it to the image: thecountjobs install an exact Node withactions/setup-nodeinside the container (works; theccfor the region addon and python3 come from the image). The merge/publish job stays on the VM (it runsnode bench/shared.mjs).wasip1,count).vendor-core.sh --checksteps stay in the Node job on the VM:vendor-core.shinstalls the runtime's pinned toolchain with rustup.Hardening
Pinned
runs-onlabels; top-levelpermissions: contents: read; write only on the jobs that push (bench, reportspublish, nightlypublish) or open issues (nightlyissue);persist-credentials: falseeverywhere except those pushing jobs; concurrency cancels in-progress runs on pull requests only;timeout-minuteson every job; everyuses:pinned to a 40-hex SHA with a version comment;defaults: run: shell: bashfor container jobs;${{ }}values inrun:moved toenv:. The schedule innightly.ymlis unchanged.Two workflows were split so the job that runs the repository's code and dependencies has a read-only token:
reports.yml:reports(measure, upload) andpublish(download, push). Publish no longer runs on pull requests, as in core and runtime; a manual run from a branch still does a dry run.nightly.yml:properties(read-only),publish(contents: write) andissue(issues: write, no checkout).Things to know
reports: 56 benchmarks in both; median change -0.11% (instructions) and -0.29% (instructions-opt), range -1.37% to +0.60%, though the published report is from an earlier commit. There is no gate and no threshold here; nothing was loosened.Rust project - stable,Rust project - stable (<os>)and the rest of the Rust matrix are nowrust / test (...)andrust / canary (ubuntu-26.04). The branch has no protection or rulesets, so nothing requires the old names today.std_extraandfloorand the Node jobs are unchanged apart from pinning, timeouts and caching.Checks
All green on this branch: CI (pull request and push), Lint, Reports, Benchmarks smoke, and manual runs of
bench.yml(4 container shards plus merge, dry-run publish),nightly.yml(properties, publish, issue skipped) andreports.ymlfrom the branch. Wall time of the CI workflow on a warm run: 2m12s here against 2 to 5m before (the 5m23s on the last main push had a cold CLI build).