A gate that does not depend on its machine, on a runner of its own
Test / gate (push) Canceled after 0s

The gate first ran on the server that deploys the site: a slow container
with no C compiler and no ICU. Ten tests failed there on correct code,
and no Mojo program could be built at all.

- The workflows ask for a runner labeled heavy, not the deploy server:
  the gate builds and runs some 300 Mojo programs and fuzzes. docs/ci.md
  says how to register one. With none registered a run waits.
- The pinned environment has a C compiler on Linux (gcc, with its C
  library pinned to glibc 2.34): mojo build links with the C compiler it
  finds, and conda-forge's default links against a C library too old
  for Mojo's runtime. mojo-local reports a program that could not be
  linked as that, and does not keep the answer.
- The pinned Dafny runs without ICU, and dafny-fetch fails when the
  Dafny it fetched does not start.
- A test's time limit is processor time at the machine's pace
  (tests/helpers/pace.mjs).
- The prover's time on the clock is the caller's: provePseudo and
  Workspace.proofBudgetMs take it, the Prove tab's 3 seconds stay the
  default, and the command line, library-check and the tests use none,
  so their answers are the counted budgets' alone.
- The library pointer moves to its workflow change (e5ae090).
This commit is contained in:
alexm committed 2026-11-13 06:13:28 -05:00
1 parent 401084bab3
commit b10a5c87a3
31 files changed
+427 -104

No files matched your search

+14 -11
View File
@@ -2,8 +2,11 @@
# environment pixi.lock pins (Node, Python, the Mojo compiler), so CI and a developer cannot drift. docs/ci.md says
# what it runs, how long it takes, and what to do when it fails.
#
# Gitea Actions, on a runner in host mode (no container: steps run on the host's shell; pplus-web's docs/deploy.md
# has the runner's setup). The same file runs on GitHub Actions with one change: `runs-on: ubuntu-latest`.
# Gitea Actions, on the runner with the label `heavy`: a machine with cores to spare, not the server that deploys
# the site, because the gate builds and runs some 300 Mojo programs and fuzzes (docs/ci.md has the runner's setup).
# With no such runner registered a run waits; nothing here runs on the deploy server. What the job needs beyond git,
# Node and curl comes from pixi.lock or is fetched by a pinned hash, so the runner may be a container or a host.
# The same file runs on GitHub Actions with one change: `runs-on: ubuntu-latest`.
name: Test
on:
push:
@@ -17,15 +20,15 @@ concurrency:
env:
# set by Gitea and GitHub Actions already; written here so the tests' "fail, not skip, under CI" never depends on it
CI: "true"
# the pixi that reads pixi.lock; when the host has another version, this one is fetched into the cache below
# the pixi that reads pixi.lock; when the runner has another version, this one is fetched into the cache below
PIXI_VERSION: "0.83.0"
jobs:
gate:
# a pull request runs only from a branch of this repository: on a host runner a fork's workflow would run its
# own code on the droplet (docs/deploy.md in pplus-web). Drop this line for a runner that is a throwaway VM.
# a pull request runs only from a branch of this repository: a fork's workflow would run its own code on the
# runner (docs/ci.md). Drop this line for a runner that is a throwaway machine.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: quarto-deploy
runs-on: heavy
timeout-minutes: 60
steps:
# library/ is pplus-library, a submodule pinned by commit: the programs, the corpus, the routines
@@ -33,14 +36,14 @@ jobs:
with:
submodules: recursive
# pixi: the host's when it is the pinned version, else the pinned release, fetched once into a cache directory
# the runner's user owns (no sudo), checked by SHA-256
# pixi: the image's when it is the pinned version, else the pinned release, fetched into a cache directory
# (which lasts only where the runner keeps a home between jobs) and checked by SHA-256
- name: pixi, pinned
shell: bash
run: |
set -euo pipefail
if command -v pixi >/dev/null && [ "$(pixi --version | cut -d' ' -f2)" = "$PIXI_VERSION" ]; then
echo "pixi $PIXI_VERSION is on the host: $(command -v pixi)"; exit 0
echo "pixi $PIXI_VERSION is on the PATH: $(command -v pixi)"; exit 0
fi
dir="${PPLUS_CI_CACHE:-$HOME/.cache/pplus-ci}/pixi-$PIXI_VERSION"
if [ ! -x "$dir/pixi" ]; then
@@ -60,8 +63,8 @@ jobs:
- name: The pinned environment, exactly as pixi.lock has it
run: pixi install --locked
# .tools/ holds the pinned Dafny and mojo-local's answers (keyed by compiler, arguments and source); on a host
# runner it lives in the cache directory, so neither is fetched or built again on every push
# .tools/ holds the pinned Dafny and mojo-local's answers (keyed by compiler, arguments and source); it is a
# link into the cache directory, so where the runner keeps a home between jobs neither is fetched or built again
- name: The pinned Dafny
shell: bash
run: |