2021-04-24 21:39:26 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. ./ci/drone/linux_script_base
|
|
|
|
|
2021-10-04 19:03:49 +01:00
|
|
|
BUILD_FLAGS="-Dskip-non-native"
|
|
|
|
|
2021-04-24 21:39:26 +01:00
|
|
|
case "$1" in
|
|
|
|
1)
|
2021-10-04 19:03:49 +01:00
|
|
|
./build/zig build $BUILD_FLAGS test-behavior
|
|
|
|
./build/zig build $BUILD_FLAGS test-compiler-rt
|
|
|
|
./build/zig build $BUILD_FLAGS test-fmt
|
|
|
|
./build/zig build $BUILD_FLAGS docs
|
2021-04-24 21:39:26 +01:00
|
|
|
;;
|
|
|
|
2)
|
2021-10-04 19:03:49 +01:00
|
|
|
# Debug
|
|
|
|
./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
|
2021-04-24 21:39:26 +01:00
|
|
|
;;
|
|
|
|
3)
|
2021-10-04 19:03:49 +01:00
|
|
|
# ReleaseSafe
|
|
|
|
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small
|
|
|
|
;;
|
|
|
|
4)
|
|
|
|
# Releasefast
|
|
|
|
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small
|
|
|
|
;;
|
|
|
|
5)
|
|
|
|
# ReleaseSmall
|
|
|
|
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast
|
|
|
|
;;
|
|
|
|
6)
|
|
|
|
./build/zig build $BUILD_FLAGS test-minilibc
|
|
|
|
./build/zig build $BUILD_FLAGS test-compare-output
|
|
|
|
./build/zig build $BUILD_FLAGS test-standalone -Dskip-release-safe
|
|
|
|
./build/zig build $BUILD_FLAGS test-stack-traces
|
|
|
|
./build/zig build $BUILD_FLAGS test-cli
|
|
|
|
./build/zig build $BUILD_FLAGS test-asm-link
|
|
|
|
./build/zig build $BUILD_FLAGS test-runtime-safety
|
|
|
|
./build/zig build $BUILD_FLAGS test-translate-c
|
|
|
|
;;
|
|
|
|
7)
|
|
|
|
./build/zig build $BUILD_FLAGS # test building self-hosted without LLVM
|
|
|
|
./build/zig build $BUILD_FLAGS test-stage2
|
2021-04-24 21:39:26 +01:00
|
|
|
;;
|
|
|
|
'')
|
|
|
|
echo "error: expecting test group argument"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "error: unknown test group: $1"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|