File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 strategy :
99 matrix :
1010 os : [ubuntu-latest, macos-latest, windows-latest]
11- version : [0.16.0]
11+ version : [0.16.0, 0.17.0 ]
1212 fail-fast : false
1313 runs-on : ${{ matrix.os }}
1414 steps :
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ fn addLinkerFlags(
8080 const webui_target = webui .rootModuleTarget ();
8181 const is_windows = webui_target .os .tag == .windows ;
8282 const is_darwin = webui_target .os .tag == .macos ;
83- const debug = webui .root_module .optimize .? == .Debug ;
83+ // Zig 0.17 renamed `OptimizeMode` to `Optimize` with lowercase tags.
84+ const debug = webui .root_module .optimize .? == if (comptime builtin .zig_version .minor >= 17 ) .debug else .Debug ;
8485 // In Zig 0.16, methods like addCSourceFile/linkLibC/addIncludePath/linkSystemLibrary/
8586 // linkFramework/addCMacro were removed from *Compile and live only on *Module.
8687 // Routing every call through `mod` keeps the build script compatible with 0.14/0.15/0.16.
@@ -185,6 +186,10 @@ fn build_examples(b: *Build, webui: *Compile) !void {
185186 };
186187 defer examples_dir .close (io );
187188
189+ // Zig 0.17 caches the configure phase; re-run it when an example
190+ // directory is added or removed.
191+ b .dependOnDirectoryContents (b .path ("examples/C" ));
192+
188193 var paths = examples_dir .iterate ();
189194 while (try paths .next (io )) | val | {
190195 if (val .kind != .directory ) continue ;
You can’t perform that action at this time.
0 commit comments