upgrade to zig 0.13.0
This commit is contained in:
parent
48c0e893da
commit
4b649eb445
|
@ -2,9 +2,8 @@ name: Build
|
|||
run-name: Standard build, creates docker image and deploys on success
|
||||
on: [push]
|
||||
env:
|
||||
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ACTIONS_RUNTIME_URL: https://git.lerch.org/api/actions_pipeline/
|
||||
ZIG_URL: https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz
|
||||
# ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# ACTIONS_RUNTIME_URL: https://git.lerch.org/api/actions_pipeline/
|
||||
BUILD_TARGET: x86_64-linux-gnu # Needs to be gnu since we're using dlopen
|
||||
BUILD_OPTIMIZATION: ReleaseSafe # Safety is usually a good thing
|
||||
jobs:
|
||||
|
@ -14,11 +13,10 @@ jobs:
|
|||
- run: echo "Triggered by ${{ github.event_name }} event"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install zig
|
||||
run: |
|
||||
curl -s "$ZIG_URL" |tar -xJ -C /usr/local \
|
||||
&& ln -s /usr/local/zig*/zig /usr/local/bin \
|
||||
&& true
|
||||
- uses: elerch/setup-zig@v3
|
||||
with:
|
||||
version: 0.13.0
|
||||
- uses: elerch/zig-action-cache@v1.1.6
|
||||
- name: Test
|
||||
run: zig build test -Dtarget="$BUILD_TARGET"
|
||||
- name: Build
|
||||
|
|
10
build.zig
10
build.zig
|
@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {
|
|||
.name = "flexilib",
|
||||
// In this case the main source file is merely a path, however, in more
|
||||
// complicated build scripts, this could be a generated file.
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void {
|
|||
.name = "flexilib-sample-lib",
|
||||
// In this case the main source file is merely a path, however, in more
|
||||
// complicated build scripts, this could be a generated file.
|
||||
.root_source_file = .{ .path = "src/main-lib.zig" },
|
||||
.root_source_file = b.path("src/main-lib.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ pub fn build(b: *std.Build) void {
|
|||
.name = "flexilib",
|
||||
// In this case the main source file is merely a path, however, in more
|
||||
// complicated build scripts, this could be a generated file.
|
||||
.root_source_file = .{ .path = "src/interface.zig" },
|
||||
.root_source_file = b.path("src/interface.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
@ -83,14 +83,14 @@ pub fn build(b: *std.Build) void {
|
|||
// Creates a step for unit testing. This only builds the test executable
|
||||
// but does not run it.
|
||||
const main_tests = b.addTest(.{
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
main_tests.linkLibC();
|
||||
|
||||
const lib_tests = b.addTest(.{
|
||||
.root_source_file = .{ .path = "src/main-lib.zig" },
|
||||
.root_source_file = b.path("src/main-lib.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
|
|
@ -397,7 +397,7 @@ pub fn main() !void {
|
|||
// panics. This is because arenas don't actually free memory until
|
||||
// they deinit. So we need to use the raw allocator here, but the
|
||||
// arena can be used to store our arguments above
|
||||
var cp = std.ChildProcess.init(al.items, raw_allocator);
|
||||
var cp = std.process.Child.init(al.items, raw_allocator);
|
||||
cp.stdin = stdin;
|
||||
cp.stdout = stdout;
|
||||
cp.stderr = stderr;
|
||||
|
|
Loading…
Reference in New Issue
Block a user