Repository navigation
ci: shared workflows, CI images, hardening (phase 4) - #120
Merged
Merged
Conversation
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 for runtime: the shared reusable workflows, the CI images by digest, and hardening of every workflow.
Moved to the org's reusable workflows
All pinned to ComlineProject/.github
797d473553d7f2fc50895bb2573acb83ac63c7cb.build_test.yml:rust-ci.ymlreplaces the stable/beta/nightly matrix, stable on the other platforms and the ubuntu-26.04 canary (the repo's one canary,continue-on-error). Inputs:--lockedbuild and test args,features: tokioforcomline-runtime. The separatecargo metadata --lockedstep is gone;--lockedon every build and test covers it.bench.yml:bench.ymlruns the instruction-count gate (base and head, same job,limit-percent: 1, the ledgerruntime/core/benches/accepted-regressions.toml, the report script's targets, so the FFI bench is gated as before) and the publish to thereportsbranch.bench-command: cargo +stable benchis how the base override is expressed: base and head are both built with the image's stable (1.99.1), whatever rust-toolchain.toml says. Without it, this PR's base (main, pinned 1.98.0) would be built with another compiler than the head, which moves counts far more than the limit.fuzz.yml:fuzz.ymlruns the per-target fuzz jobs, the report and the publish. The target list is still the fuzz crate's[[bin]]s through.github/scripts/fuzz-targets.py(atargetsjob), so that stays the single source.lint.yml(new): actionlint, andrenovate.jsonchecked with--strict.Kept local, and why
propertiesandsizes(fuzz.yml): runtime's own proptest jobs; they run in the ci-fuzz image.propertieswrites thefuzz-stats-proptestfragment the reusable report combines, so thefuzzcall hasneeds: [targets, properties](andif: !cancelled() && needs.targets.result == 'success', sincepropertiesis skipped on a pull request).specs(ci-tools: cue),ffi(ci-tools: cbindgen, gcc, make; the wasm32 target is added withrustup target add),wasm32 core(ci-wasm): runtime-specific jobs; each runs in the image that has its tool, so no apt or curl-pipe installs remain.ffi miri: on the VM; no image has miri.ffi_platforms(Windows, macOS, arm Linux): no container possible;cbindgenis built withcargo install --lockedthere.reports.yml: runtime-specific Observatory reports, on the VM; hardened only.egress-policy: audit.reportsbranch (the publish jobs) are the only ones withpersist-credentialsleft on, and the only ones withcontents: write.Other changes
rust-toolchain.toml1.98.0 -> 1.99.1 (edited, nocargo update). Container jobs that don't need clippy or rustfmt setRUSTUP_TOOLCHAIN: stable, the image's 1.99.1, so the file's components aren't fetched.runs-on: ubuntu-24.04(macOS and Windows pinned tomacos-15andwindows-2025), top-levelpermissions: contents: read,concurrencyby workflow and ref with cancel-in-progress on pull requests only,timeout-minuteson every job, everyuses:a 40-hex SHA with a version comment, and adefaults: run: shell: bashon the workflows with container jobs (container steps default tosh).renovate.jsonextendsgithub>ComlineProject/.github:renovate-config.grep -rn 'apt-get\|brew install\|choco install\|curl .*| *sh' .github/is empty. The Windowsmakestep is now acommand -v makecheck: the runner image has MinGW's make.Bench history
There are no committed baselines. The gate compares base and head inside one job on one image, so the move from Ubuntu valgrind 3.22 to Debian 3.24 doesn't touch it. The published history on the
reportsbranch will step on the first push to main after merge: valgrind 3.24 shifts counts by up to about 0.44%, and rustc 1.98.0 -> 1.99.1 shifts some by more (the PR's report against the published one shows 160 of 173 benchmarks changed, from -32% to +28%, mostly the compiler and code since 7fd4523, which can't be separated from valgrind in this comparison). Nothing is regenerated and no threshold is loosened.Required checks: names change
The ruleset's required checks need updating at merge time. Old to new:
Rust project - stable/beta/nightly->ci / test (stable)/ci / test (beta)/ci / test (nightly)fuzz (<target>)->fuzz / fuzz (<target>), fordecode_no_panic,ffi_comline2,ffi_feed,ffi_vs_core,framing_decode,packed_canonical,seed_vs_derive,sizes_vs_core,stream_splitinstruction counts->bench / instruction-count gateffi,ffi miri,wasm32 core. New and optional:lint / actionlint,lint / renovate-config.json,conformance specs.Not exercised on this PR
The nightly-only paths: the
propertiesjob (nightly proptest with its report fragment), the fuzz report's publish, and the issue-opening steps. A manual bench run from this branch did the publish as a dry run and passed.