Some checks failed
judge / Build judge (push) Successful in 8s
judge / Linux / gcc / Debug (push) Successful in 7s
judge / Linux / clang / Release (push) Successful in 9s
judge / Linux / gcc / Release (push) Successful in 10s
judge / Linux / clang / Sanitized (push) Successful in 8s
judge / Linux / gcc / Sanitized (push) Successful in 9s
judge / Linux / gcc / Debug (valgrind) (push) Successful in 15s
judge / Windows / clang / Debug (push) Successful in 37s
judge / Windows / clang / Release (push) Successful in 40s
judge / Windows / msvc / Debug (push) Successful in 45s
judge / Windows / msvc / Release (push) Successful in 43s
judge / SUMMARY (push) Failing after 2s
c-sum — cross-platform C example
Minimal example: a C program that reads N then N integers and prints their
sum. Tested with judge across gcc / clang / MSVC on Linux / Windows,
with optional valgrind and sanitizer runs.
Files
solution.c— student-facing solution (could be what the student submits)sum.jdg— judge test suite.gitea/workflows/judge.yml— Gitea CI matrix
Run locally
# Linux / macOS
CC=gcc judge sum.jdg .
CC=clang judge sum.jdg .
# With valgrind
judge sum.jdg . --wrapper="valgrind --error-exitcode=99 --leak-check=full -q"
# With ASan+UBSan build
CC=clang CFLAGS="-O1 -g -fsanitize=address,undefined" judge sum.jdg .
On Windows (inside an MSVC dev cmd shell), build_windows kicks in and
produces solution.exe, which the runner auto-detects.
Notes about the .jdg
normalize_crlf = true— Windowsprintfemits\r\n; we strip\rbefore matching so the same expected outputs work on both platforms.trim_trailing_ws = true— forgives trailing spaces a student's output might pick up (rare but annoying to debug).binary = "solution"— the runner triessolutionfirst, thensolution.exeon Windows automatically.- Per-group
scoring = all_or_noneonstressgives weight only if every stress test passes.
Adapting the Gitea workflow
runs-on: ${{ matrix.toolchain.system }}-Runnerassumes you have self-hosted Gitea runners labelledLinux-Runner/Windows-Runner(same naming as your existingfixed_floatingpipeline).secrets.VAR_TOKENis only needed when pulling a student repo from a private org.- The summary job shells
grepover the JSON; swap tojqif available on your runners.