Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/zig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [0.16.0]
version: [0.16.0, 0.17.0]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
7 changes: 6 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ fn addLinkerFlags(
const webui_target = webui.rootModuleTarget();
const is_windows = webui_target.os.tag == .windows;
const is_darwin = webui_target.os.tag == .macos;
const debug = webui.root_module.optimize.? == .Debug;
// Zig 0.17 renamed `OptimizeMode` to `Optimize` with lowercase tags.
const debug = webui.root_module.optimize.? == if (comptime builtin.zig_version.minor >= 17) .debug else .Debug;
// In Zig 0.16, methods like addCSourceFile/linkLibC/addIncludePath/linkSystemLibrary/
// linkFramework/addCMacro were removed from *Compile and live only on *Module.
// Routing every call through `mod` keeps the build script compatible with 0.14/0.15/0.16.
Expand Down Expand Up @@ -185,6 +186,10 @@ fn build_examples(b: *Build, webui: *Compile) !void {
};
defer examples_dir.close(io);

// Zig 0.17 caches the configure phase; re-run it when an example
// directory is added or removed.
b.dependOnDirectoryContents(b.path("examples/C"));

var paths = examples_dir.iterate();
while (try paths.next(io)) |val| {
if (val.kind != .directory) continue;
Expand Down
Loading