| author | |
| committer | |
| log | 7e2b6b0f1bc5877f11c50a217dd88c11481bbad4 |
| tree | 47805e9e075a0d24a7fef26bb3b5b59808aec7dd |
| parent | 5b7eefce4696e68132a0e8d5a0be4d0ae87dc6f7 |
This reverts commit 4d1432299fe5dccef1e8254800e365c4d6c0d435.
Please don't hard-code unrelated concerns this way. build.zig should not
have awareness of the naming conventions for cmake build directories.5 files changed, 19 insertions(+), 11 deletions(-)
build.zig+2-7| ... | @@ -422,18 +422,13 @@ pub fn build(b: *std.Build) !void { | ... | @@ -422,18 +422,13 @@ pub fn build(b: *std.Build) !void { |
| 422 | const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; | 422 | const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; |
| 423 | 423 | ||
| 424 | const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; | 424 | const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; |
| 425 | const fmt_exclude_paths = &.{ | 425 | const fmt_exclude_paths = &.{"test/cases"}; |
| 426 | "test/cases", | ||
| 427 | // This is for the CI scripts. | ||
| 428 | "build-debug", | ||
| 429 | "build-release", | ||
| 430 | }; | ||
| 431 | const do_fmt = b.addFmt(.{ | 426 | const do_fmt = b.addFmt(.{ |
| 432 | .paths = fmt_include_paths, | 427 | .paths = fmt_include_paths, |
| 433 | .exclude_paths = fmt_exclude_paths, | 428 | .exclude_paths = fmt_exclude_paths, |
| 434 | }); | 429 | }); |
| 435 | 430 | ||
| 436 | b.step("check-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ | 431 | b.step("test-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ |
| 437 | .paths = fmt_include_paths, | 432 | .paths = fmt_include_paths, |
| 438 | .exclude_paths = fmt_exclude_paths, | 433 | .exclude_paths = fmt_exclude_paths, |
| 439 | .check = true, | 434 | .check = true, |
ci/aarch64-linux-debug.sh+4-1| ... | @@ -50,8 +50,11 @@ unset CXX | ... | @@ -50,8 +50,11 @@ unset CXX |
| 50 | 50 | ||
| 51 | ninja install | 51 | ninja install |
| 52 | 52 | ||
| 53 | # TODO: move this to a build.zig step (check-fmt) | ||
| 53 | echo "Looking for non-conforming code formatting..." | 54 | echo "Looking for non-conforming code formatting..." |
| 54 | stage3-debug/bin/zig build check-fmt | 55 | stage3-debug/bin/zig fmt --check .. \ |
| 56 | --exclude ../test/cases/ \ | ||
| 57 | --exclude ../build-debug | ||
| 55 | 58 | ||
| 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm | 59 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 57 | stage3-debug/bin/zig build \ | 60 | stage3-debug/bin/zig build \ |
ci/aarch64-linux-release.sh+4-1| ... | @@ -50,8 +50,11 @@ unset CXX | ... | @@ -50,8 +50,11 @@ unset CXX |
| 50 | 50 | ||
| 51 | ninja install | 51 | ninja install |
| 52 | 52 | ||
| 53 | # TODO: move this to a build.zig step (check-fmt) | ||
| 53 | echo "Looking for non-conforming code formatting..." | 54 | echo "Looking for non-conforming code formatting..." |
| 54 | stage3-release/bin/zig build check-fmt | 55 | stage3-release/bin/zig fmt --check .. \ |
| 56 | --exclude ../test/cases/ \ | ||
| 57 | --exclude ../build-release | ||
| 55 | 58 | ||
| 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm | 59 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 57 | stage3-release/bin/zig build \ | 60 | stage3-release/bin/zig build \ |
ci/x86_64-linux-debug.sh+4-1| ... | @@ -50,8 +50,11 @@ unset CXX | ... | @@ -50,8 +50,11 @@ unset CXX |
| 50 | 50 | ||
| 51 | ninja install | 51 | ninja install |
| 52 | 52 | ||
| 53 | # TODO: move this to a build.zig step (check-fmt) | ||
| 53 | echo "Looking for non-conforming code formatting..." | 54 | echo "Looking for non-conforming code formatting..." |
| 54 | stage3-debug/bin/zig build check-fmt | 55 | stage3-debug/bin/zig fmt --check .. \ |
| 56 | --exclude ../test/cases/ \ | ||
| 57 | --exclude ../build-debug | ||
| 55 | 58 | ||
| 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm | 59 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 57 | stage3-debug/bin/zig build \ | 60 | stage3-debug/bin/zig build \ |
ci/x86_64-linux-release.sh+5-1| ... | @@ -50,8 +50,12 @@ unset CXX | ... | @@ -50,8 +50,12 @@ unset CXX |
| 50 | 50 | ||
| 51 | ninja install | 51 | ninja install |
| 52 | 52 | ||
| 53 | # TODO: move this to a build.zig step (check-fmt) | ||
| 53 | echo "Looking for non-conforming code formatting..." | 54 | echo "Looking for non-conforming code formatting..." |
| 54 | stage3-release/bin/zig build check-fmt | 55 | stage3-release/bin/zig fmt --check .. \ |
| 56 | --exclude ../test/cases/ \ | ||
| 57 | --exclude ../build-debug \ | ||
| 58 | --exclude ../build-release | ||
| 55 | 59 | ||
| 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm | 60 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 57 | stage3-release/bin/zig build \ | 61 | stage3-release/bin/zig build \ |