zig/ci/zinc/linux_test.sh
Andrew Kelley 2f42a2617b CI: more stage2 test coverage
* Test everything on the Linux CI even if we can't run it, because it's
   our fastest machine.
 * Test stage2 using a build of stage2 (instead of using `-fno-stage1`)
   so that compiler-rt is also built with stage2.
 * Additionally test running x86_64-macos on the macOS CI, both the LLVM
   backend and x86_64 backend.
2022-02-17 23:41:58 -07:00

52 lines
2.3 KiB
Bash
Executable File

#!/bin/sh
. ./ci/zinc/linux_base.sh
ZIG=$DEBUG_STAGING/bin/zig
# Build stage2 standalone so that we can test stage2 against stage2 compiler-rt.
$ZIG build -p stage2 -Denable-llvm
stage2/bin/zig test test/behavior.zig -I test -fLLVM
stage2/bin/zig test test/behavior.zig -I test
stage2/bin/zig test test/behavior.zig -I test -fLLVM -target aarch64-linux --test-cmd qemu-aarch64 --test-cmd-bin
stage2/bin/zig test test/behavior.zig -I test -target aarch64-linux --test-cmd qemu-aarch64 --test-cmd-bin
stage2/bin/zig test test/behavior.zig -I test -ofmt=c
stage2/bin/zig test test/behavior.zig -I test -target wasm32-wasi --test-cmd wasmtime --test-cmd-bin
stage2/bin/zig test test/behavior.zig -I test -target arm-linux --test-cmd qemu-arm --test-cmd-bin
stage2/bin/zig test test/behavior.zig -I test -fLLVM -target aarch64-macos --test-no-exec
stage2/bin/zig test test/behavior.zig -I test -target aarch64-macos --test-no-exec
stage2/bin/zig test test/behavior.zig -I test -fLLVM -target x86_64-macos --test-no-exec
stage2/bin/zig test test/behavior.zig -I test -target x86_64-macos --test-no-exec
$ZIG build test-behavior -fqemu -fwasmtime
$ZIG build test-compiler-rt -fqemu -fwasmtime
$ZIG build test-std -fqemu -fwasmtime
$ZIG build test-minilibc -fqemu -fwasmtime
$ZIG build test-compare-output -fqemu -fwasmtime
$ZIG build test-standalone -fqemu -fwasmtime
$ZIG build test-stack-traces -fqemu -fwasmtime
$ZIG build test-cli -fqemu -fwasmtime
$ZIG build test-asm-link -fqemu -fwasmtime
$ZIG build test-runtime-safety -fqemu -fwasmtime
$ZIG build test-translate-c -fqemu -fwasmtime
$ZIG build test-run-translated-c -fqemu -fwasmtime
$ZIG build docs -fqemu -fwasmtime
$ZIG build # test building self-hosted without LLVM
$ZIG build -Dtarget=arm-linux-musleabihf # test building self-hosted for 32-bit arm
$ZIG build test-fmt -fqemu -fwasmtime
$ZIG build test-stage2 -fqemu -fwasmtime
# Produce the experimental std lib documentation.
mkdir -p $RELEASE_STAGING/docs/std
$ZIG test lib/std/std.zig \
--zig-lib-dir lib \
-femit-docs=$RELEASE_STAGING/docs/std \
-fno-emit-bin
# Look for HTML errors.
tidy --drop-empty-elements no -qe zig-cache/langref.html
# Explicit exit helps show last command duration.
exit