CI: enable stage2 behavior test coverage

This commit is contained in:
Andrew Kelley 2021-07-27 17:16:26 -07:00
parent c1285a1bbe
commit c47b46fc8d
5 changed files with 25 additions and 6 deletions

View File

@ -69,9 +69,11 @@ release/bin/zig fmt --check ..
cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig"
make $JOBS install make $JOBS install
for step in test-toolchain test-std docs; do release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
release/bin/zig build $step -Denable-qemu -Denable-wasmtime
done release/bin/zig build test-toolchain -Denable-qemu -Denable-wasmtime
release/bin/zig build test-std -Denable-qemu -Denable-wasmtime
release/bin/zig build docs -Denable-qemu -Denable-wasmtime
# Look for HTML errors. # Look for HTML errors.
tidy -qe ../zig-cache/langref.html tidy -qe ../zig-cache/langref.html

View File

@ -54,9 +54,12 @@ make $JOBS install
cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig"
make $JOBS install make $JOBS install
for step in test-toolchain test-std docs; do # TODO figure out why this causes a segmentation fault
release/bin/zig build $step # release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
done
release/bin/zig build test-toolchain
release/bin/zig build test-std
release/bin/zig build docs
if [ "${BUILD_REASON}" != "PullRequest" ]; then if [ "${BUILD_REASON}" != "PullRequest" ]; then
mv ../LICENSE release/ mv ../LICENSE release/

View File

@ -26,6 +26,10 @@ cd %ZIGBUILDDIR%
cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release -DZIG_OMIT_STAGE2=ON || exit /b cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release -DZIG_OMIT_STAGE2=ON || exit /b
msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
REM Sadly, stage2 is omitted from this build to save memory on the CI server. Once self-hosted is
REM built with itself and does not gobble as much memory, we can enable these tests.
REM "%ZIGINSTALLDIR%\bin\zig.exe" test "..\test\behavior.zig" -fno-stage1 -fLLVM -I "..\test" || exit /b
"%ZIGINSTALLDIR%\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests || exit /b "%ZIGINSTALLDIR%\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests || exit /b
"%ZIGINSTALLDIR%\bin\zig.exe" build test-std -Dskip-non-native || exit /b "%ZIGINSTALLDIR%\bin\zig.exe" build test-std -Dskip-non-native || exit /b
"%ZIGINSTALLDIR%\bin\zig.exe" build docs || exit /b "%ZIGINSTALLDIR%\bin\zig.exe" build docs || exit /b

View File

@ -38,6 +38,11 @@ cmake .. \
-GNinja -GNinja
samu install samu install
# TODO ld.lld: error: undefined symbol: main
# >>> referenced by crt1_c.c:75 (/usr/src/lib/csu/amd64/crt1_c.c:75)
# >>> /usr/lib/crt1.o:(_start)
#release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
# Here we skip some tests to save time. # Here we skip some tests to save time.
release/bin/zig build test -Dskip-compile-errors -Dskip-non-native release/bin/zig build test -Dskip-compile-errors -Dskip-non-native

View File

@ -51,6 +51,11 @@ samu install
unset CC unset CC
unset CXX unset CXX
# TODO ld.lld: error: undefined symbol: main
#>>> referenced by crt0-common.c
#>>> /usr/lib/crt0.o:(___start)
#release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
# Here we skip some tests to save time. # Here we skip some tests to save time.
release/bin/zig build test -Dskip-compile-errors -Dskip-non-native release/bin/zig build test -Dskip-compile-errors -Dskip-non-native