| author | |
| committer | |
| log | 4d1432299fe5dccef1e8254800e365c4d6c0d435 |
| tree | e9206b8f21e4c3bd5d6c579ad989864a18ce39d9 |
| parent | f33bb0228b40a1171fafad40415bd5744e617e21 |
We already have a zig build step for this: test-fmt.
* Rename the test-fmt step to check-fmt.
test-fmt sounds like it runs tests for `zig fmt` itself (lib/std/zig/render.zig).
* Use it instead of `zig fmt --check` in the CI scripts.
* Also use it in CI scripts that didn't have this check before.5 files changed, 11 insertions(+), 19 deletions(-)
build.zig+7-2| ... | ... | @@ -422,13 +422,18 @@ pub fn build(b: *std.Build) !void { |
| 422 | 422 | const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index]; |
| 423 | 423 | |
| 424 | 424 | const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" }; |
| 425 | const fmt_exclude_paths = &.{"test/cases"}; | |
| 425 | const fmt_exclude_paths = &.{ | |
| 426 | "test/cases", | |
| 427 | // This is for the CI scripts. | |
| 428 | "build-debug", | |
| 429 | "build-release", | |
| 430 | }; | |
| 426 | 431 | const do_fmt = b.addFmt(.{ |
| 427 | 432 | .paths = fmt_include_paths, |
| 428 | 433 | .exclude_paths = fmt_exclude_paths, |
| 429 | 434 | }); |
| 430 | 435 | |
| 431 | b.step("test-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ | |
| 436 | b.step("check-fmt", "Check source files having conforming formatting").dependOn(&b.addFmt(.{ | |
| 432 | 437 | .paths = fmt_include_paths, |
| 433 | 438 | .exclude_paths = fmt_exclude_paths, |
| 434 | 439 | .check = true, |
ci/aarch64-linux-debug.sh+1-4| ... | ... | @@ -50,11 +50,8 @@ unset CXX |
| 50 | 50 | |
| 51 | 51 | ninja install |
| 52 | 52 | |
| 53 | # TODO: move this to a build.zig step (check-fmt) | |
| 54 | 53 | echo "Looking for non-conforming code formatting..." |
| 55 | stage3-debug/bin/zig fmt --check .. \ | |
| 56 | --exclude ../test/cases/ \ | |
| 57 | --exclude ../build-debug | |
| 54 | stage3-debug/bin/zig build check-fmt | |
| 58 | 55 | |
| 59 | 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 60 | 57 | stage3-debug/bin/zig build \ |
ci/aarch64-linux-release.sh+1-4| ... | ... | @@ -50,11 +50,8 @@ unset CXX |
| 50 | 50 | |
| 51 | 51 | ninja install |
| 52 | 52 | |
| 53 | # TODO: move this to a build.zig step (check-fmt) | |
| 54 | 53 | echo "Looking for non-conforming code formatting..." |
| 55 | stage3-release/bin/zig fmt --check .. \ | |
| 56 | --exclude ../test/cases/ \ | |
| 57 | --exclude ../build-release | |
| 54 | stage3-release/bin/zig build check-fmt | |
| 58 | 55 | |
| 59 | 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 60 | 57 | stage3-release/bin/zig build \ |
ci/x86_64-linux-debug.sh+1-4| ... | ... | @@ -50,11 +50,8 @@ unset CXX |
| 50 | 50 | |
| 51 | 51 | ninja install |
| 52 | 52 | |
| 53 | # TODO: move this to a build.zig step (check-fmt) | |
| 54 | 53 | echo "Looking for non-conforming code formatting..." |
| 55 | stage3-debug/bin/zig fmt --check .. \ | |
| 56 | --exclude ../test/cases/ \ | |
| 57 | --exclude ../build-debug | |
| 54 | stage3-debug/bin/zig build check-fmt | |
| 58 | 55 | |
| 59 | 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 60 | 57 | stage3-debug/bin/zig build \ |
ci/x86_64-linux-release.sh+1-5| ... | ... | @@ -50,12 +50,8 @@ unset CXX |
| 50 | 50 | |
| 51 | 51 | ninja install |
| 52 | 52 | |
| 53 | # TODO: move this to a build.zig step (check-fmt) | |
| 54 | 53 | echo "Looking for non-conforming code formatting..." |
| 55 | stage3-release/bin/zig fmt --check .. \ | |
| 56 | --exclude ../test/cases/ \ | |
| 57 | --exclude ../build-debug \ | |
| 58 | --exclude ../build-release | |
| 54 | stage3-release/bin/zig build check-fmt | |
| 59 | 55 | |
| 60 | 56 | # simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 61 | 57 | stage3-release/bin/zig build \ |