ci: add zig 0.11.0 (#62)
* chore(ci): add 0.11.0 Signed-off-by: Rui Chen <rui@chenrui.dev> * Support zig 0.11 build system --------- Signed-off-by: Rui Chen <rui@chenrui.dev> Co-authored-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
parent
c7b6cdd3ad
commit
8dab702865
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
zig-version: [0.7.0, 0.8.0, 0.9.0, 0.10.0]
|
zig-version: [0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
zig-version: 0.5.0
|
zig-version: 0.5.0
|
||||||
|
@ -30,6 +30,11 @@ jobs:
|
||||||
uses: goto-bus-stop/setup-zig@default
|
uses: goto-bus-stop/setup-zig@default
|
||||||
with:
|
with:
|
||||||
version: ${{matrix.zig-version}}
|
version: ${{matrix.zig-version}}
|
||||||
- name: Run tests
|
- name: Run tests (zig up to v0.10.x)
|
||||||
|
if: ${{ !startsWith(matrix.zig-version, '0.11.') }}
|
||||||
run: zig build test
|
run: zig build test
|
||||||
working-directory: test
|
working-directory: test/v0.10
|
||||||
|
- name: Run tests (zig v0.11.x)
|
||||||
|
if: ${{ startsWith(matrix.zig-version, '0.11.') }}
|
||||||
|
run: zig build test
|
||||||
|
working-directory: test/v0.11
|
||||||
|
|
13
test/v0.11/build.zig
Normal file
13
test/v0.11/build.zig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
const Build = @import("std").Build;
|
||||||
|
|
||||||
|
pub fn build(b: *Build) void {
|
||||||
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
const test_build = b.addTest(.{
|
||||||
|
.root_source_file = .{ .path = "src/main.zig" },
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
const run_test = b.addRunArtifact(test_build);
|
||||||
|
|
||||||
|
const test_step = b.step("test", "Run the app");
|
||||||
|
test_step.dependOn(&run_test.step);
|
||||||
|
}
|
5
test/v0.11/src/main.zig
Normal file
5
test/v0.11/src/main.zig
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
const debug = @import("std").debug;
|
||||||
|
|
||||||
|
test "it works" {
|
||||||
|
debug.assert(1 == 1);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user