Skip to content

Commit

Permalink
.github/workflows: update zig version. (#11)
Browse files Browse the repository at this point in the history
* .github/workflows: update zig version.
  • Loading branch information
avdva authored Sep 3, 2024
1 parent 460657d commit a046539
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 82 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/test.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- run: zig build test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- run: zig fmt --check .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/zig-cache
/zig-out
/.vscode
/.zig-cache
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ pub fn build(b: *std.Build) void {

const lib = b.addStaticLibrary(.{
.name = package_name,
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = package_path }},
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = package_path } },
.target = target,
.optimize = optimize,
});

_ = b.addModule(package_name, .{
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = package_path }},
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = package_path } },
});

b.installArtifact(lib);

const main_tests = b.addTest(.{
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/tests.zig" }},
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/tests.zig" } },
.target = target,
.optimize = optimize,
});
Expand Down

0 comments on commit a046539

Please sign in to comment.