Skip to content

Enable CI, disable CD - #1223

Open
yiyi-wang-rv wants to merge 1 commit into
developfrom
enable-ci-disable-cd
Open

yiyi-wang-rv wants to merge 1 commit into
developfrom
enable-ci-disable-cd

Conversation

@yiyi-wang-rv

@yiyi-wang-rv yiyi-wang-rv commented Nov 5, 2026 •

Copy link
Copy Markdown

Why

CI on this repository has to come back without any secrets. CD goes away completely. This does for the LLVM
backend what runtimeverification/k#4974 did for K.

The last Nix run that reached the self-hosted runners failed on both of them with
Cachix Auth token "CACHIX_PUBLIC_TOKEN" has been revoked. The runners now use rootless
Podman, which the Docker-based jobs did not support.

What changes

Removed CD and every secret

  • develop.yml: bumped the version and pushed to master with JENKINS_GITHUB_PAT.
  • master-pr.yml: retargeted PRs from master to develop with JENKINS_GITHUB_PAT.
  • release.yml: on a push to master, built and uploaded the Ubuntu packages, published
    to Cachix with CACHIX_PUBLIC_TOKEN, published the GitHub release, and dispatched
    runtimeverification/devops with JENKINS_GITHUB_PAT.
  • update-deps.yml: synced scala-kore and rv-nix-tools on _update-deps/* branches with
    JENKINS_GITHUB_PAT.
  • The Nix flake job drops install-nix-action and cachix-action, as K's Nix job does.
    The runners already have Nix. cachix-action failed because it picks up the revoked
    token still stored on the runners.
  • README.md no longer says that merging to develop releases automatically.

Hardening

  • permissions: contents: read on all workflows, and persist-credentials: false on every
    checkout, including the one inside test-package.

  • Every action is pinned to the commit SHA of its latest release: checkout v7.0.1,
    setup-java v6.1.0, clang-format-action v4.18.0, action-shellcheck 2.0.0,
    zizmor-action v0.8.1.

  • No ${{ }} expressions are left in run: blocks. They go through env: instead.

  • New lint-workflows.yml and .github/zizmor.yml, identical to K's:

    • actionlint: pinned to 1.7.12, with the download's checksum verified.
    • zizmor: reports findings as annotations and fails the check.

    Neither is a required check yet.

Self-hosted jobs on Podman

  • with-docker copies the sources into the container with docker cp instead of
    bind-mounting them, then chowns them to the image user. test-package copies the
    built package back out.

    The test container still bind-mounts the workspace. It runs as root, which Podman
    maps to the runner user, so it can write there.

  • The container runs as the image's own github-user (uid 1000), in a WORKDIR that the
    image now creates. The runner's user and UID are no longer passed in.

  • The Dockerfile removes noble's built-in ubuntu user, which also has uid 1000, before
    it creates github-user.

  • Each job and matrix entry gets its own container name. Before, Clang Tidy check and
    both Build LLVM backend from source entries all used llvm-backend-ci-<sha>, so they
    could remove each other's containers.

  • Each container is force-removed before it starts and torn down with docker rm -f || true.
    Otherwise a container left over from a canceled run of the same commit would block
    the next run.

  • The package-test teardown removed k-package-test-*, but the container is named
    kllvm-package-test-*. It now removes the right one.

No more Docker Hub pulls

  • The Ubuntu base images now come from public.ecr.aws/docker/library/ubuntu, AWS's
    mirror of the Docker official images. The package test container uses the same mirror.
    Neither needs a login, and neither has Docker Hub's anonymous pull rate limit.

Smaller changes

  • lit is pinned to 18.1.8. pipx installed the latest lit, and lit 23 refuses the
    external shell that test/lit.cfg.py asks for (ShTest(True)). PyPI has no lit release
    between 18.1.8 and 23.
  • Build Ubuntu package no longer makes a second checkout into k-llvm-<distro>, which
    nothing used.
  • actionlint.yaml lists the self-hosted runner labels in use: normal and self-macos-latest.

Tested

CI on this PR passed: all 12 checks, including the self-hosted source-build, package and
Nix jobs on Linux and macOS. The logs confirm that:

  • Both source builds pass 6/6 ctest and 267/267 lit tests, on jammy (LLVM 15) and noble (LLVM 17).
  • Ubuntu images were pulled from public.ecr.aws, and nothing was pulled from Docker Hub.
  • No job used a secret, and no token value appears in any log.

Notes for reviewers

  • The develop → master flow stops. Merging to develop no longer bumps the
    version, updates master, publishes a release or a Cachix build, or notifies devops.
    PRs opened against master are not retargeted to develop.
  • The only token CI still uses is the automatic, per-run GITHUB_TOKEN, read-only.
  • The self-hosted runners still hold revoked Cachix credentials. No job uses them,
    but PR code runs on those hosts and could read them. The Linux runner's Nix
    configuration still lists the private runtimeverification and web-deployment-infra
    Cachix caches. Every Nix step logs a 401 for them
    (Cachix Auth token "CACHIX_WEB_PRIVATE_TOKEN" has been revoked), and the job still
    passes. The runner owners should remove those substituters and their netrc-file or
    access-tokens entries, plus the Cachix config holding CACHIX_PUBLIC_TOKEN.
  • PR code runs on persistent self-hosted runners. zizmor's auditor persona flags those
    jobs; that is by design. Keep "require approval" for outside contributors on.
  • Required checks: every required check on develop keeps its name. The Nix matrix
    keeps its unused os value because it is part of the required job names.
  • clang-format-action moves from v4.11.0 to v4.18.0. It uses the same clang-format 15
    image and file regex, but checks all files in one call.

Follow-ups

  • Decide what replaces release/CD: version bump, tags, GitHub releases, Ubuntu packages,
    Cachix and the devops dispatch.
  • Dependency-bump automation (update-deps.yml) is gone. scala-kore and rv-nix-tools
    bumps are manual for now. package/version.sh and scripts/update-scala-kore.sh are
    kept for manual use.

🤖 Generated with Claude Code

Keep the pull-request CI and remove the release/deploy workflows, so that
no workflow uses a repository secret.

- Delete develop.yml, master-pr.yml, release.yml and update-deps.yml, the
  only workflows that used JENKINS_GITHUB_PAT, CACHIX_PUBLIC_TOKEN or a
  write token.
- Set `permissions: contents: read`, pin every action to a commit SHA and
  set `persist-credentials: false` on every checkout.
- Pass expressions to shell through `env:` instead of inlining them.
- Drop install-nix-action and cachix-action from the Nix job: the
  self-hosted runners already have Nix, and cachix-action picked up a
  revoked token stored on them.
- Make the Docker steps work on the rootless Podman runners: copy the
  sources into the container instead of bind-mounting them, use a fixed
  uid-1000 user (removing noble's own `ubuntu` user), give each job and
  matrix entry its own container name, and pull the base image from the
  ECR Public mirror instead of Docker Hub.
- Pin lit to 18.1.8: lit 23 rejects the external shell that
  test/lit.cfg.py asks for.
- Fix the package-test teardown, which removed the wrong container, and
  drop an unused second checkout.
- Add actionlint and zizmor checks for the workflows, as in K.
- Drop the README sentence about automatic releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
palinatolmach pushed a commit to runtimeverification/mir-semantics that referenced this pull request Nov 12, 2026
### Why

CI on this repository should run without any repository secrets, and CD
is removed. This
does for mir-semantics what runtimeverification/k#4974,
runtimeverification/llvm-backend#1223
and runtimeverification/haskell-backend#4166 did.

It supersedes #1094 and keeps its commits. #1094 removed CD and every
secret, but its
self-hosted jobs failed in `Set up Docker` with exit code 125. The
commit on top fixes that
and adds the same hardening as the other repositories.

### What changes

**From #1094: CD and every secret removed**
- `release.yml`, `p-token-release.yml` and `master-push.yml`: the
release pipeline (version bump,
  GitHub releases, Docker Hub images, Cachix).
- `update-dependencies.yml`: dependency-bump automation.
- `test-cachix-pin.yml` and `.github/scripts/check-cachix-pin.sh`.
- `JENKINS_GITHUB_PAT` removed from the checkouts. The only submodule,
`stable-mir-json`, is public.
- `cachix-action` removed from the `Nix Tests` job.
- Actions bumped to their latest releases.

**Self-hosted jobs on rootless Podman**
- **The CI image's base is now fully qualified,** as
`docker.io/runtimeverificationinc/kframework-k`.
Rootless Podman refuses the short name when no unqualified-search
registry is configured, and
  that was the exit code 125 in #1094.
- **`with-docker` no longer overrides `USER`.** `USER` is exported, and
rootless Podman looks up the
runner user's subordinate UIDs by `$USER`. With `USER=github-user` it
found none and fell back to
a single mapping, where only root exists in the container. The image
build then failed at its
  first `apt-get`. The container user is now `CONTAINER_USER`.
- **The checkout is copied with `docker cp ./.`** instead of `docker cp
.`. On the runners' Podman,
a bare `.` landed in a subdirectory, and `make` found no Makefile. K and
llvm-backend use `./.`.
- **Each job and matrix entry gets its own container name.** All six
`Integration Tests` entries
used `mir-semantics-ci-<sha>`, so two of them on one runner removed each
other's container.
- **Containers are cleaned up reliably.** Each container is
force-removed before it starts and torn
down with `docker rm -f || true`. A container left over from a canceled
run of the same commit
  no longer blocks the next run.
- **`Nix Tests` no longer runs `install-nix-action`** on the self-hosted
runners, which already have
Nix. On those runners it only printed `Aborting: Nix is already
installed`.

**Hardening**
- `permissions: contents: read` on every workflow, and
`persist-credentials: false` on every
  checkout.
- In `test-stable-mir-ui.yml` this also covers the rust-lang/rust
checkout. Before, it was copied
    into the container with the token still in its git config.
- Every action is pinned to the commit SHA of its latest release:
checkout v7.0.1, setup-uv v10.3.3,
install-nix-action v31.11.3, setup-buildx-action v4.4.1,
build-push-action v7.4.0,
  upload-artifact v7.0.2, zizmor-action v0.8.1.
- No `${{ }}` expressions are left in `run:` blocks. They go through
`env:` instead.
- New `lint-workflows.yml` and `.github/zizmor.yml`, identical to K's:
- **actionlint**: pinned to 1.7.12, with the download's checksum
verified.
  - **zizmor**: reports findings as annotations and fails the check.

  Neither is a required check yet.

**Fixes**
- **`smir-parse-tests` ran no tests in CI.** It looked for the tests
under `$(PWD)`, which
`docker exec` does not set, so `Integration with stable-mir-json` passed
without parsing anything.
It now uses `$(CURDIR)`, and fails if it finds no tests. Its 35 tests
pass.
- `Test Kmir Image` appended its summary to a file literally named
`GITHUB_STEP_SUMMARY`. Its job
  outputs are gone too, since only the release pipeline used them.
- `test-stable-mir-ui.yml` copied the rust-lang/rust checkout into the
container twice: once with
the workspace, and again into `rust/rust`. Runs of the same commit,
which share a container name,
  no longer overlap.
- `nix/README.md` no longer says CI uploads to the binary cache.

### Tested

CI on this PR passed: all 14 checks, including all 8 self-hosted jobs.
The Docker jobs ran on
github-runner-01, -02 and -03.
- The integration test suites all pass:
  - `LLVM Concrete Tests`: 60 passed
  - `Haskell Exec SMIR`: 40 passed
  - `Haskell Termination`: 20 passed
  - `Haskell Proofs`: 106 passed
  - `Verify Rust Std`: 16 passed
  - `Remainder`: 129 passed, 7 skipped
- `Unit Tests`: 40 passed.
- `Integration with stable-mir-json` parses all 35 `smir-parse-tests`
programs, instead of none.
- `Nix Tests (normal)` and `Nix Tests (MacM1)` pass on the runners' own
Nix, with no Cachix step.
- Every job's `GITHUB_TOKEN` was read-only (`Contents: read`). No job
used a secret, and no token
  value appears in any log.

### Notes for reviewers

- **Releases stop.** Merging to `master` no longer bumps the version,
tags, publishes a GitHub
release, pushes `runtimeverificationinc/kmir` to Docker Hub, or pushes
to Cachix.
  `package/version.sh` is kept for manual use.
- **The CI images are frozen at K 7.1.337.**
`.github/workflows/Dockerfile` and `Dockerfile.kmir`
build `FROM
runtimeverificationinc/kframework-k:ubuntu-jammy-<deps/k_release>`. Only
K's release
pipeline published that image, and that pipeline is gone, so bumping
`deps/k_release` past 7.1.337
will break `Set up Docker` and `Test Kmir Image` until the image is
published some other way.
- **`Nix Tests (normal)` relies on the runner's own Nix configuration**
for the `k-framework` cache.
The workflow cannot add it: the runner user is not a trusted Nix user,
so `cachix use` was already
  refused there. If the job times out, the runner admins can add
`extra-substituters = https://k-framework.cachix.org` and its public key
to `/etc/nix/nix.conf`.
  It is a public cache, so no token is needed.
- **The only token CI still uses is the automatic, per-run
`GITHUB_TOKEN`**, read-only.
- **PR code runs on persistent self-hosted runners.** zizmor's auditor
persona flags those jobs; that
  is by design. Keep "require approval" for outside contributors on.
- **Required checks:** all 12 required checks on `master` keep their
names.

### Follow-ups

- Decide what replaces release/CD: version bump, tags, GitHub releases,
Docker images, Cachix.
- Publish `kframework-k` images somewhere other than K's removed release
pipeline, or build the CI
  image from a public base plus the K release `.deb`.
- Dependency bumps (K, stable-mir-json, uv, rust toolchain) are manual
for now.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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