Skip to content

Commit

Permalink
zig changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Apr 23, 2023
1 parent f1d6a22 commit a246a04
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 27 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/Darwin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: MacOS

on:
push:
paths:
- '**.zig'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
on: [push, pull_request]

jobs:
build:
Expand All @@ -18,7 +12,7 @@ jobs:
fetch-depth: 0
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0-dev.2666+1e207f1ed

- name: Install deps
env:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Linux

on:
push:
paths:
- '**.zig'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
on: [push, pull_request]

jobs:
build:
Expand All @@ -18,7 +12,7 @@ jobs:
fetch-depth: 0
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0-dev.2666+1e207f1ed

- name: Install dependences
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/MinGW.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: MSYS2 (MingW)

on:
push:
paths:
- '**.zig'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
on: [push, pull_request]

jobs:
build:
Expand All @@ -27,7 +21,7 @@ jobs:
fetch-depth: 0
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0-dev.2666+1e207f1ed
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
Expand Down
14 changes: 11 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ fn make_example(b: *std.Build, info: BuildInfo) void {
example.linkLibCpp()
else
example.linkLibC();
example.install();
b.installArtifact(example);

const run_cmd = example.run();
const run_cmd = b.addRunArtifact(example);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
Expand All @@ -160,7 +160,7 @@ fn checkVersion() bool {
return false;
}

const needed_version = std.SemanticVersion.parse("0.11.0-dev.2191") catch unreachable;
const needed_version = std.SemanticVersion.parse("0.11.0-dev.2666") catch unreachable;
const version = builtin.zig_version;
const order = version.order(needed_version);
return order != .lt;
Expand Down Expand Up @@ -196,3 +196,11 @@ fn msys2Lib(target: std.zig.CrossTarget) []const u8 {
else => "D:/msys64/clang32/lib",
};
}

pub fn module(b: *std.Build) *std.Build.Module {
return b.createModule(.{
.source_file = .{
.path = "src/vlc.zig",
},
});
}

0 comments on commit a246a04

Please sign in to comment.