authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-09-12 14:19:16-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-09-12 14:32:05-07:00
log7e2b6b0f1bc5877f11c50a217dd88c11481bbad4
tree47805e9e075a0d24a7fef26bb3b5b59808aec7dd
parent5b7eefce4696e68132a0e8d5a0be4d0ae87dc6f7

Revert "ci: use zig build check-fmt instead of zig fmt --check"

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];
423423
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 });
435430
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
5050
51ninja install51ninja install
5252
53# TODO: move this to a build.zig step (check-fmt)
53echo "Looking for non-conforming code formatting..."54echo "Looking for non-conforming code formatting..."
54stage3-debug/bin/zig build check-fmt55stage3-debug/bin/zig fmt --check .. \
56 --exclude ../test/cases/ \
57 --exclude ../build-debug
5558
56# simultaneously test building self-hosted without LLVM and with 32-bit arm59# simultaneously test building self-hosted without LLVM and with 32-bit arm
57stage3-debug/bin/zig build \60stage3-debug/bin/zig build \
ci/aarch64-linux-release.sh+4-1
...@@ -50,8 +50,11 @@ unset CXX...@@ -50,8 +50,11 @@ unset CXX
5050
51ninja install51ninja install
5252
53# TODO: move this to a build.zig step (check-fmt)
53echo "Looking for non-conforming code formatting..."54echo "Looking for non-conforming code formatting..."
54stage3-release/bin/zig build check-fmt55stage3-release/bin/zig fmt --check .. \
56 --exclude ../test/cases/ \
57 --exclude ../build-release
5558
56# simultaneously test building self-hosted without LLVM and with 32-bit arm59# simultaneously test building self-hosted without LLVM and with 32-bit arm
57stage3-release/bin/zig build \60stage3-release/bin/zig build \
ci/x86_64-linux-debug.sh+4-1
...@@ -50,8 +50,11 @@ unset CXX...@@ -50,8 +50,11 @@ unset CXX
5050
51ninja install51ninja install
5252
53# TODO: move this to a build.zig step (check-fmt)
53echo "Looking for non-conforming code formatting..."54echo "Looking for non-conforming code formatting..."
54stage3-debug/bin/zig build check-fmt55stage3-debug/bin/zig fmt --check .. \
56 --exclude ../test/cases/ \
57 --exclude ../build-debug
5558
56# simultaneously test building self-hosted without LLVM and with 32-bit arm59# simultaneously test building self-hosted without LLVM and with 32-bit arm
57stage3-debug/bin/zig build \60stage3-debug/bin/zig build \
ci/x86_64-linux-release.sh+5-1
...@@ -50,8 +50,12 @@ unset CXX...@@ -50,8 +50,12 @@ unset CXX
5050
51ninja install51ninja install
5252
53# TODO: move this to a build.zig step (check-fmt)
53echo "Looking for non-conforming code formatting..."54echo "Looking for non-conforming code formatting..."
54stage3-release/bin/zig build check-fmt55stage3-release/bin/zig fmt --check .. \
56 --exclude ../test/cases/ \
57 --exclude ../build-debug \
58 --exclude ../build-release
5559
56# simultaneously test building self-hosted without LLVM and with 32-bit arm60# simultaneously test building self-hosted without LLVM and with 32-bit arm
57stage3-release/bin/zig build \61stage3-release/bin/zig build \