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

+16 -2
View File
@@ -13,6 +13,12 @@ it into .tools/dafny-<version>/ (ignored by git). The zip is self-contained: it
builds Dafny was tested with, so the solver is pinned too. To move to another Dafny, change VERSION and every hash in
RELEASES in one commit, and expect every stored proof answer to be asked again.
One thing the zip does not carry is ICU, which .NET loads for culture-aware text; on a machine without it (a slim
container image) Dafny aborts before it prints its version. Dafny is run here with DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
(`env()` below), which tells .NET not to look for ICU: verifying a program compares no text by culture, so the
verdicts are the same and the machine needs nothing installed. Whatever else runs the executable (scripts/library.mjs,
tests/dafny.test.mjs) sets the same variable.
Standard library only, like the corpus pipeline.
"""
from __future__ import annotations
@@ -98,16 +104,24 @@ def fetch(quiet: bool = False) -> Path:
return EXE
def env() -> dict[str, str]:
"""The environment Dafny runs in: this one, and .NET told not to look for ICU (the module's docstring)."""
return {**os.environ, "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT": "1"}
def main(argv: list[str]) -> int:
if argv[:1] == ["fetch"]:
fetch()
print(subprocess.run([str(EXE), "--version"], capture_output=True, text=True).stdout.strip())
v = subprocess.run([str(EXE), "--version"], capture_output=True, text=True, env=env())
if v.returncode != 0 or not v.stdout.startswith(VERSION):
raise SystemExit(f"dafny: the fetched Dafny does not start here (exit {v.returncode}): {(v.stderr or v.stdout).strip()[:400]}")
print(v.stdout.strip())
return 0
if argv[:1] == ["path"]:
print(fetch(quiet=True))
return 0
exe = fetch()
return subprocess.run([str(exe), *argv]).returncode
return subprocess.run([str(exe), *argv], env=env()).returncode
if __name__ == "__main__":