All checks were successful
build-dsl-smoke / Build judge (push) Successful in 12s
build-dsl-smoke / debug / clang / linux (push) Successful in 6s
build-dsl-smoke / debug / gcc / linux (push) Successful in 8s
build-dsl-smoke / release / clang / linux (push) Successful in 8s
build-dsl-smoke / release / gcc / linux (push) Successful in 6s
build-dsl-smoke / sanitized / clang / linux (push) Successful in 8s
build-dsl-smoke / sanitized / gcc / linux (push) Successful in 7s
build-dsl-smoke / debug / clang / windows (push) Successful in 13s
build-dsl-smoke / debug-valgrind / gcc / linux (push) Successful in 14s
build-dsl-smoke / release / clang / windows (push) Successful in 16s
build-dsl-smoke / debug / msvc / windows (push) Successful in 18s
build-dsl-smoke / release / msvc / windows (push) Successful in 17s
build-dsl-smoke / SUMMARY (push) Successful in 4s
Release / Build & publish (push) Successful in 48s
Reviewed-on: #1
83 lines
1.6 KiB
Plaintext
83 lines
1.6 KiB
Plaintext
// Smoke test for the structured build DSL. Same task as example/c-sum
|
|
// (sum of N integers) but described declaratively — no shell strings,
|
|
// no per-platform `if /I "%CC%"=="msvc"` branching. The compiler is
|
|
// selected via the JUDGE_CC env variable set by the CI matrix.
|
|
|
|
toolchains {
|
|
gcc { platforms = "linux" }
|
|
clang { platforms = "linux" "windows" }
|
|
msvc { platforms = "windows" }
|
|
}
|
|
|
|
build_defaults {
|
|
language = "c"
|
|
standard = "c11"
|
|
sources = "solution.c"
|
|
output = "solution"
|
|
warnings = strict
|
|
}
|
|
|
|
build "release" {
|
|
profile = release
|
|
}
|
|
|
|
build "debug" {
|
|
profile = debug
|
|
}
|
|
|
|
build "sanitized" {
|
|
profile = sanitized
|
|
sanitize = "address" "undefined"
|
|
platforms = "linux"
|
|
compilers = "gcc" "clang"
|
|
}
|
|
|
|
build "debug-valgrind" {
|
|
profile = debug
|
|
wrapper = "valgrind --error-exitcode=99 --leak-check=full -q"
|
|
platforms = "linux"
|
|
compilers = "gcc"
|
|
}
|
|
|
|
timeout 5s
|
|
normalize_crlf = true
|
|
trim_trailing_ws = true
|
|
|
|
group("basic") {
|
|
weight = 0.5
|
|
|
|
test("one number") {
|
|
stdin = "1\n42\n"
|
|
stdout = "42\n"
|
|
}
|
|
|
|
test("three numbers") {
|
|
stdin = "3\n1 2 3\n"
|
|
stdout = "6\n"
|
|
}
|
|
|
|
test("negatives") {
|
|
stdin = "4\n-1 -2 3 5\n"
|
|
stdout = "5\n"
|
|
}
|
|
|
|
test("zero count") {
|
|
stdin = "0\n"
|
|
stdout = "0\n"
|
|
}
|
|
}
|
|
|
|
group("edge") {
|
|
weight = 0.5
|
|
|
|
test("large sum fits in int64") {
|
|
stdin = "3\n2000000000 2000000000 2000000000\n"
|
|
stdout = "6000000000\n"
|
|
}
|
|
|
|
test("multiline input") {
|
|
stdin = "5\n10\n20\n30\n40\n50\n"
|
|
stdout = "150\n"
|
|
}
|
|
}
|