mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
ci: skip release-small tests to save time
we keep hitting the limit on how long CI tests take to run.
This commit is contained in:
parent
a757533386
commit
869475c110
27
build.zig
27
build.zig
@ -62,6 +62,9 @@ pub fn build(b: *Builder) !void {
|
||||
b.default_step.dependOn(&exe.step);
|
||||
|
||||
const skip_release = b.option(bool, "skip-release", "Main test suite skips release builds") orelse false;
|
||||
const skip_release_small = b.option(bool, "skip-release-small", "Main test suite skips release-small builds") orelse skip_release;
|
||||
const skip_release_fast = b.option(bool, "skip-release-fast", "Main test suite skips release-fast builds") orelse skip_release;
|
||||
const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;
|
||||
const skip_self_hosted = b.option(bool, "skip-self-hosted", "Main test suite skips building self hosted compiler") orelse false;
|
||||
if (!skip_self_hosted) {
|
||||
test_step.dependOn(&exe.step);
|
||||
@ -83,13 +86,23 @@ pub fn build(b: *Builder) !void {
|
||||
test_step.dependOn(test_stage2_step);
|
||||
}
|
||||
|
||||
const all_modes = []builtin.Mode{
|
||||
builtin.Mode.Debug,
|
||||
builtin.Mode.ReleaseSafe,
|
||||
builtin.Mode.ReleaseFast,
|
||||
builtin.Mode.ReleaseSmall,
|
||||
};
|
||||
const modes = if (skip_release) []builtin.Mode{builtin.Mode.Debug} else all_modes;
|
||||
var chosen_modes: [4]builtin.Mode = undefined;
|
||||
var chosen_mode_index: usize = 0;
|
||||
chosen_modes[chosen_mode_index] = builtin.Mode.Debug;
|
||||
chosen_mode_index += 1;
|
||||
if (!skip_release_safe) {
|
||||
chosen_modes[chosen_mode_index] = builtin.Mode.ReleaseSafe;
|
||||
chosen_mode_index += 1;
|
||||
}
|
||||
if (!skip_release_fast) {
|
||||
chosen_modes[chosen_mode_index] = builtin.Mode.ReleaseFast;
|
||||
chosen_mode_index += 1;
|
||||
}
|
||||
if (!skip_release_small) {
|
||||
chosen_modes[chosen_mode_index] = builtin.Mode.ReleaseSmall;
|
||||
chosen_mode_index += 1;
|
||||
}
|
||||
const modes = chosen_modes[0..chosen_mode_index];
|
||||
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "test/behavior.zig", "behavior", "Run the behavior tests", modes));
|
||||
|
||||
|
@ -23,4 +23,4 @@ cd %ZIGBUILDDIR%
|
||||
cmake.exe .. -Thost=x64 -G"Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGBUILDDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b
|
||||
msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b
|
||||
|
||||
bin\zig.exe build --build-file ..\build.zig test || exit /b
|
||||
bin\zig.exe build --build-file ..\build.zig test -Dskip-release-small || exit /b
|
||||
|
@ -10,7 +10,7 @@ mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make -j2 install
|
||||
./zig build --build-file ../build.zig test
|
||||
./zig build --build-file ../build.zig test -Dskip-release-small
|
||||
|
||||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
||||
mkdir $TRAVIS_BUILD_DIR/artifacts
|
||||
|
@ -9,4 +9,4 @@ cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@6/ -DCMAKE_BUILD_TYPE=Release
|
||||
make VERBOSE=1
|
||||
make install
|
||||
|
||||
./zig build --build-file ../build.zig test
|
||||
./zig build --build-file ../build.zig test -Dskip-release-small
|
||||
|
Loading…
Reference in New Issue
Block a user