File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : drivers
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ branches : [main]
7+
8+ jobs :
9+ test :
10+ name : Unit Test
11+ runs-on : ${{ matrix.os }}
12+
13+ strategy :
14+ matrix :
15+ os : [ubuntu-latest, windows-latest, macos-latest]
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Zig
21+ uses : mlugg/setup-zig@v1
22+ with :
23+ version : 0.14.0
24+
25+ - name : Run Test Suite
26+ working-directory : drivers
27+ run : zig build test
Original file line number Diff line number Diff line change 11const std = @import ("std" );
22
33pub fn build (b : * std.Build ) void {
4+ const target = b .standardTargetOptions (.{});
5+ const optimize = b .standardOptimizeOption (.{});
6+
47 const drivers_mod = b .addModule ("drivers" , .{
58 .root_source_file = b .path ("framework.zig" ),
9+ .target = target ,
10+ .optimize = optimize ,
611 });
712
8- _ = drivers_mod ;
9-
1013 const test_suite = b .addTest (.{
11- .root_source_file = b . path ( "framework.zig" ) ,
14+ .root_module = drivers_mod ,
1215 .target = b .graph .host ,
13- .optimize = .Debug ,
1416 });
1517
16- b .getInstallStep ().dependOn (& b .addRunArtifact (test_suite ).step );
18+ const run_tests = b .addRunArtifact (test_suite );
19+ const test_step = b .step ("test" , "Run unit tests" );
20+ test_step .dependOn (& run_tests .step );
1721}
You can’t perform that action at this time.
0 commit comments