mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-10 22:27:08 +01:00
Two invariants had been established by hand and left ungated, which is the
"a remedy that only works if someone remembers" pattern:
- scripts/check_ignore_consistency.sh fails the commit if any TRACKED file
is also gitignored. .binary-allowlist used to *instruct* the reader to
re-run that check; now it is enforced. Verified both ways -- passes on the
tree, and fails when an ignored file is force-added.
DOCS-runnability.md now really has two columns. Each environment writes only
its own gates/runnability-<env>.tsv and the doc renders from both, so a CI run
cannot clobber the local results. The ci tsv is gitignored: committing a copy
generated here would label this machine's capabilities as the runner's.
Rendering it surfaced a classic bug -- awk's NR==FNR idiom silently swallows
the SECOND file when the first is empty, so the table came out with a header
and no rows. It compares FILENAME instead.
runnability.yml deliberately does NOT diff against a committed baseline. A
status is a property of the machine, so `runnable` locally and `blocked` on a
runner is correct rather than drift, and diffing would make the workflow red
by construction. It fails on `error` instead -- a runner that crashes or
reports an unknown kind.
Then five more courses were actually run, because EADS alone had produced four
real bugs and one sample proves nothing:
- ECOAR and EPFU build (nasm + 32-bit gcc, and gcc respectively).
- ECOTE's 17 test modules could not run AT ALL. Its package is named `code/`,
which shadows the standard library: pytest's debugging plugin imports pdb,
pdb imports code, and it got this directory instead, so the suite died
with an INTERNALERROR before collecting a single test. Renamed to
translator/ with all 17 imports updated -- 26 tests now pass.
- A LaTeX report builds. That one exposed a hazard rather than a bug:
latexmk wrote its PDF beside the source, and in a course where the built
name matches the submitted one it would have silently overwritten a
tracked deliverable. Both the LaTeX and C++ runners now build into a
gitignored build/, and rebuilding ECOGR leaves `git status` empty.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: runnability
|
|
|
|
# Probes every course directory and fails if any RUNNER is broken.
|
|
#
|
|
# Deliberately NOT a diff against a committed baseline. A runner's status is a
|
|
# property of the machine, not of the commit: MATLAB, Unity and the .NET SDK
|
|
# are absent here and present locally, so `runnable` on a laptop and `blocked`
|
|
# on ubuntu-latest is correct rather than drift. Diffing the two would make
|
|
# this workflow red by construction, which is the one outcome the whole
|
|
# exercise is meant to avoid.
|
|
#
|
|
# What IS a defect, and what this catches: a run.sh that crashes, hangs, or
|
|
# reports an unknown kind. Those are `error`, and any `error` fails the job.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
runnability:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Probe every course directory
|
|
run: ./run.sh status
|
|
|
|
- name: Fail on any broken runner
|
|
run: |
|
|
set -euo pipefail
|
|
if grep -qP '\terror\t' gates/runnability-ci.tsv; then
|
|
echo "::error::a course run.sh failed to probe"
|
|
grep -P '\terror\t' gates/runnability-ci.tsv
|
|
exit 1
|
|
fi
|
|
echo "all runners probed cleanly"
|
|
cut -f2 gates/runnability-ci.tsv | sort | uniq -c
|