Skip to content

Commit 3d34ea1

Browse files
committed
Adds step to build but not run example, uses in CI
1 parent e2f035d commit 3d34ea1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: zig fmt --ast-check --check .
3535

3636
- name: Build for Windows
37-
run: zig build -Dtarget=x86_64-windows-gnu --summary all
37+
run: zig build example -Dtarget=x86_64-windows-gnu --summary all
3838

3939
- name: Build for Linux
40-
run: zig build -Dtarget=x86_64-linux-gnu --summary all
40+
run: zig build example -Dtarget=x86_64-linux-gnu --summary all

build.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ pub fn build(b: *std.Build) !void {
124124
}),
125125
});
126126
example.linkLibrary(lib);
127+
128+
const build_example_step = b.step("example", "Build the example app");
129+
build_example_step.dependOn(&example.step);
130+
127131
const run_example = b.addRunArtifact(example);
128132
const run_step = b.step("run-example", "Run the example app");
129133
run_step.dependOn(&run_example.step);

0 commit comments

Comments
 (0)