Repository navigation
Conversation
|
@cryos @assignUser please review. I re-created PR from my fork and merged latest main |
Actually there is a new syntax where you start the path with |
It worked because we have |
|
Yes, but with this you can install git first and get a proper git checkout instead of just the archive from the api fallback! |
deb008a to
dc0de9b
Compare
|
please take another look @assignUser |
Self-hosted runners reject pull_request, so these workflows trigger on the copy-pr-bot mirror. Cargo jobs use rust:1.98.0-bookworm. CUDA jobs use the Ubuntu devel image, which already has the toolkit, and check the repo out before the local setup action. The Pages deploy stays on ubuntu-latest. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
The CUDA image has no git, so checkout falls back to an API tarball unless git is already installed. The $/ action reference runs that install first. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
A blank line between workflow steps makes the step list easier to scan. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
copy-pr-bot creates pull-request/<n> at an existing SHA, and GitHub often treats that push as having no changed files. A workflow-level `paths:` filter then skips the run, so a pull request can pass with CI, docs, examples, CodeQL, book and naming checks never started. cutile-rs.yml already avoids this. Drop `paths:` from ci, docs, examples-compile, codeql, book and naming-guard. Each now has a `changes` job that runs dorny/paths-filter against main with the old path list. Jobs run when the filter matches, when no file diff is detected, or when the event is not a push (schedule, workflow_dispatch). If the gate job itself fails the jobs run, so the gate cannot hide a check. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
…ror pushes The append-only ABI ledger check picked its base from the pull_request event. On a copy-pr-bot mirror push there is no such event, and on the first push to a new pull-request/<n> branch `before` is all zeros, so the base fell back to HEAD^. Only the last commit was compared, and a breaking ledger change in an earlier commit of a multi-commit pull request passed the final check. For pull-request/<n> branches use the merge base with origin/main, which the fetch-depth 0 checkout already has. Other pushes keep `before`, then HEAD^. Print the chosen base in the log. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
On a copy-pr-bot mirror push the analyze action uploads under refs/heads/pull-request/<n>, so the scan runs and the job goes green but its results never attach to the pull request's code scanning alerts. Resolve refs/pull/<n>/head and the pushed SHA, which is the pull request's head commit, and pass them to the analyze action's `ref` and `sha` inputs. Pushes to main and scheduled runs leave both empty and keep the default ref. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
The setup-cuda-container action installed Rust with `curl https://sh.rustup.rs | sh`, with no version and no checksum. The Jimver/cuda-toolkit step it replaced was pinned to a commit. Download rustup-init 1.29.2 from the versioned archive URL and check its published SHA-256 before running it. Fail on a non-x86_64 host, since the pinned checksum is for that target. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
The book build interpolated ${{ github.ref }} straight into the shell script.
A branch name is chosen by whoever pushes it, so pass it through the
environment variable GitHub already sets instead of expanding it into the
script text.
Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
The Rust jobs now run in rust:1.98.0-bookworm because the runner VM image has no rustup. That tag copies the stable pin in the root rust-toolchain.toml, in twelve places, and nothing keeps them together; the existing parity guard only covers the SIMT pin under cuda-oxide/. A stale tag still builds, since rustup installs the pinned toolchain, but it costs a download in every job and puts the CodeQL Rust extractor on a different compiler. Add check-ci-image-pins.sh and run it in the toolchain-pin-parity job and in `just check-guards`. It fails if no rust:<version> reference is found, so it cannot pass by matching nothing. Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
df17c90 to
316a1e0
Compare
|
/ok to test 316a1e0 |
Summary
Fixes #1518. Move the GitHub-hosted
ubuntu-latestjobs ontolinux-amd64-cpu4(m7i.xlarge, 4 vCPU / 16 GiB), the same size asubuntu-latest. Tile test jobs incutile-rs.ymlalready run onlinux-amd64-cpu16and stay there.book.yml'sdeployjob stays onubuntu-latest, becauseactions/deploy-pagespublishes GitHub Pages from a GitHub-hosted runner.Supersedes #1377. That draft was closed; this one is opened from
roivanov/cuda-rust.Problem
ubuntu-latestis 4 vCPU / 16 GB. On this public repository those minutes are free, and that size is the whole free pool. A larger GitHub-hosted runner is billed here too.nv-cpu-generalis the same class of machine at the EC2 rate, and this repository already has that group for Tile CI.Rust CodeQL is the long job. On main push
6d47ae4it took 38m 31s (run); the baseline onubuntu-latestwas 42m 51s (job). On that same push,examples-compiletook 9m 39s and clippy 5m 1s. An 8-core run left the Rust extract at about 35 minutes: the extractor loads each Cargo workspace through rust-analyzer with one worker thread. This pull request keeps every moved job onlinux-amd64-cpu4.Security
ubuntu-latestruns apull_requestworkflow on its own, including one opened from outside NVIDIA.nv-cpu-generaldoes not. Only an NVIDIA employee can start a job on these runners. An outside pull request runs only after an employee has checked that it is legitimate and approved it throughcopy-pr-bot.Each job gets its own VM, destroyed when the job ends. Inbound network access is blocked. The moved workflows trigger on
pushtomainand topull-request/[0-9]+, which is whatcutile-rs.ymlalready does.copy-pr-botis already enabled (.github/copy-pr-bot.yaml). Draft pull requests do not auto-sync.Cost
NVIDIA/cuda-rustis public. Standardubuntu-latestminutes are free. GitHub larger runners are billed on public repositories too.nv-cpu-generalis self-hosted EC2: GitHub does not meter it. The bill is the instance.Rates are list price. GitHub rounds each job up to the next minute. EC2 is us-east-1 Linux on-demand; the runner group's region and any enterprise discount are not in the runner docs. The 150 GiB volume on these labels is extra and small next to the instance.
6d47ae4ran everyubuntu-latestjob this move takes: 53 jobs, 93.1 minutes of runner time, 125 billed minutes.book.ymldeployis left out of that total.ubuntu-latest(this repo, public)linux-amd64-cpu4(this PR)The Rust CodeQL job, measured in
rust:1.98.0-bookwormonlinux-amd64-cpu8, was 36 billed minutes (run): about $0.24 oncpu8, about $0.12 oncpu4if that duration holds. Installingrustupon the 8-core VM took 35m 12s (run). The container run took the same 35 minutes.Changes
runs-on: linux-amd64-cpu4for the jobs that were onubuntu-latest: CI's callees (fmt,clippy,unit-tests,cargo-deny),docs,examples-compile,codeql,bookbuild,status-guard,naming-guard,ci-status, and thechangesjob incutile-rs.yml.Drop
pull_request. Trigger onpushtomainandpull-request/[0-9]+.Jobs that call
cargo,rustfmt, or the CodeQL Rust extractor run inrust:1.98.0-bookworm. That matches the rootrust-toolchain.tomlpin. The Oxide nightly still comes fromcuda-oxide/rust-toolchain.tomlwhen the job enters that tree. Thenv-cpu-generalimage has norustup, and a missingrustupmakes the Rust extractor exit 0 with an empty database. The Rust leg fails ifrustup show active-toolchaincannot see the root pin.CUDA jobs (
clippy,docs,examples-compile, and thecuda.hunit tests) run innvidia/cuda:13.1.1-devel-ubuntu24.04. The toolkit installer needslsb_releaseand an Ubuntu apt repo, so it fails inrust:bookworm. The devel image already has the toolkit. Container steps use bash; the default shell is dash, which rejectsset -o pipefail.The CUDA jobs call
.github/actions/setup-cuda-containerwith the$/form, which loads the action from the workflow's own commit before checkout. It installs git first (the CUDA image has none), so checkout gets a real clone, then marks the workspace safe for git and installs a pinned, checksum-verifiedrustup-init.examples-compilealso installs python3 forsync-example-locks.sh.book.ymldeploystays onubuntu-latestand runs only forrefs/heads/main, so a mirror push cannot publish the site.Tile test jobs in
cutile-rs.ymlstay onlinux-amd64-cpu16.Path-filtered workflows (
ci,docs,examples-compile,codeql,book,naming-guard) no longer use a workflow-levelpaths:filter. copy-pr-bot createspull-request/<n>at an existing SHA, so GitHub often sees no changed files and would skip the run. Each has achangesjob (dorny/paths-filteragainst main, ascutile-rs.ymldoes); the jobs run when it matches, when no diff is detected, when the event is not a push, or when the gate itself fails.The intrinsic ABI ledger check compares against the merge base with
origin/mainonpull-request/<n>pushes, notHEAD^, so an earlier commit of a multi-commit PR cannot hide a breaking change.CodeQL uploads to
refs/pull/<n>/headwith the pushed SHA on mirror pushes, so results reach the pull request's code scanning alerts.cuda-oxide/scripts/check-ci-image-pins.sh(run in the toolchain-pin-parity job andjust check-guards) fails if a workflow'srust:<version>image no longer matches the rootrust-toolchain.toml.Result
Container run on
linux-amd64-cpu8: Rust analysis 35m 1s.rustc 1.98.0 (88d9e12ae 2026-08-18), active toolchain overridden by the rootrust-toolchain.toml. 1,391 files extracted without error, 190 with errors, 1,580 scanned.Analyze (actions)passed in the same image.Testing
pull-request/<n>runs each moved workflow onlinux-amd64-cpu4: on headdc0de9b, 62 jobs ran onlinux-amd64-cpu4, 6 onlinux-amd64-cpu16, and only the skippeddeployonubuntu-latestbook.ymldeploystill runs onubuntu-latestand only formain(skipped on the mirror push; runs after merge)pull_requestany more, so none can target a self-hosted labelchangesgates start the right workflows and skip the rest (this PR touches.github/workflows/**, so every filter matched)ci-statusruns on the bare runner VM and callsgh; it only runs after a main push, so it is first exercised after mergeWorkflow-only change.
just checkand example smoketests do not apply.Post-PR TODOs
Checklist
git commit -s)