| author | |
| committer | |
| log | cb1d1bdf59f2979de9c534c21813d824f9736cfb |
| tree | 86a1052e839111dae378a7dfc61d620f8f04f00c |
| parent | eb8201afde98d9ba35d0c8488d418b1b0bef4f35 |
There was already `zig build test-fmt` but now `zig build test` depends
on that one.
The CI scripts no longer need explicit logic since they already do
`zig build test`.5 files changed, 5 insertions(+), 34 deletions(-)
build.zig+5-5| ... | ... | @@ -428,18 +428,21 @@ pub fn build(b: *std.Build) !void { |
| 428 | 428 | } |
| 429 | 429 | const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; |
| 430 | 430 | |
| 431 | const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; | |
| 431 | const fmt_include_paths = &.{ "lib", "src", "test", "tools", "build.zig", "build.zig.zon" }; | |
| 432 | 432 | const fmt_exclude_paths = &.{"test/cases"}; |
| 433 | 433 | const do_fmt = b.addFmt(.{ |
| 434 | 434 | .paths = fmt_include_paths, |
| 435 | 435 | .exclude_paths = fmt_exclude_paths, |
| 436 | 436 | }); |
| 437 | b.step("fmt", "Modify source files in place to have conforming formatting").dependOn(&do_fmt.step); | |
| 437 | 438 | |
| 438 | b.step("test-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ | |
| 439 | const check_fmt = b.step("test-fmt", "Check source files having conforming formatting"); | |
| 440 | check_fmt.dependOn(&b.addFmt(.{ | |
| 439 | 441 | .paths = fmt_include_paths, |
| 440 | 442 | .exclude_paths = fmt_exclude_paths, |
| 441 | 443 | .check = true, |
| 442 | 444 | }).step); |
| 445 | test_step.dependOn(check_fmt); | |
| 443 | 446 | |
| 444 | 447 | const test_cases_step = b.step("test-cases", "Run the main compiler test cases"); |
| 445 | 448 | try tests.addCases(b, test_cases_step, test_filters, check_case_exe, target, .{ |
| ... | ... | @@ -534,9 +537,6 @@ pub fn build(b: *std.Build) !void { |
| 534 | 537 | |
| 535 | 538 | try addWasiUpdateStep(b, version); |
| 536 | 539 | |
| 537 | b.step("fmt", "Modify source files in place to have conforming formatting") | |
| 538 | .dependOn(&do_fmt.step); | |
| 539 | ||
| 540 | 540 | const update_mingw_step = b.step("update-mingw", "Update zig's bundled mingw"); |
| 541 | 541 | const opt_mingw_src_path = b.option([]const u8, "mingw-src", "path to mingw-w64 source directory"); |
| 542 | 542 | const update_mingw_exe = b.addExecutable(.{ |
ci/aarch64-linux-debug.sh-7| ... | ... | @@ -49,13 +49,6 @@ unset CXX |
| 49 | 49 | |
| 50 | 50 | ninja install |
| 51 | 51 | |
| 52 | # TODO: move this to a build.zig step (check-fmt) | |
| 53 | echo "Looking for non-conforming code formatting..." | |
| 54 | stage3-debug/bin/zig fmt --check .. \ | |
| 55 | --exclude ../test/cases/ \ | |
| 56 | --exclude ../doc/ \ | |
| 57 | --exclude ../build-debug | |
| 58 | ||
| 59 | 52 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 60 | 53 | stage3-debug/bin/zig build \ |
| 61 | 54 | -Dtarget=arm-linux-musleabihf \ |
ci/aarch64-linux-release.sh-7| ... | ... | @@ -49,13 +49,6 @@ unset CXX |
| 49 | 49 | |
| 50 | 50 | ninja install |
| 51 | 51 | |
| 52 | # TODO: move this to a build.zig step (check-fmt) | |
| 53 | echo "Looking for non-conforming code formatting..." | |
| 54 | stage3-release/bin/zig fmt --check .. \ | |
| 55 | --exclude ../test/cases/ \ | |
| 56 | --exclude ../doc/ \ | |
| 57 | --exclude ../build-release | |
| 58 | ||
| 59 | 52 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 60 | 53 | stage3-release/bin/zig build \ |
| 61 | 54 | -Dtarget=arm-linux-musleabihf \ |
ci/x86_64-linux-debug.sh-7| ... | ... | @@ -57,13 +57,6 @@ unset CXX |
| 57 | 57 | |
| 58 | 58 | ninja install |
| 59 | 59 | |
| 60 | # TODO: move this to a build.zig step (check-fmt) | |
| 61 | echo "Looking for non-conforming code formatting..." | |
| 62 | stage3-debug/bin/zig fmt --check .. \ | |
| 63 | --exclude ../test/cases/ \ | |
| 64 | --exclude ../doc/ \ | |
| 65 | --exclude ../build-debug | |
| 66 | ||
| 67 | 60 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 68 | 61 | stage3-debug/bin/zig build \ |
| 69 | 62 | -Dtarget=arm-linux-musleabihf \ |
ci/x86_64-linux-release.sh-8| ... | ... | @@ -57,14 +57,6 @@ unset CXX |
| 57 | 57 | |
| 58 | 58 | ninja install |
| 59 | 59 | |
| 60 | # TODO: move this to a build.zig step (check-fmt) | |
| 61 | echo "Looking for non-conforming code formatting..." | |
| 62 | stage3-release/bin/zig fmt --check .. \ | |
| 63 | --exclude ../test/cases/ \ | |
| 64 | --exclude ../doc/ \ | |
| 65 | --exclude ../build-debug \ | |
| 66 | --exclude ../build-release | |
| 67 | ||
| 68 | 60 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 69 | 61 | stage3-release/bin/zig build \ |
| 70 | 62 | -Dtarget=arm-linux-musleabihf \ |