upgrade to zig 0.13.0
All checks were successful
Build / build (push) Successful in 1m4s
Build / sign (push) Successful in 36s
Build / deploy (push) Successful in 1m36s

This commit is contained in:
Emil Lerch 2024-06-08 10:13:06 -07:00
parent 48c0e893da
commit 4b649eb445
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
3 changed files with 12 additions and 14 deletions

View File

@ -2,9 +2,8 @@ name: Build
run-name: Standard build, creates docker image and deploys on success run-name: Standard build, creates docker image and deploys on success
on: [push] on: [push]
env: env:
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_RUNTIME_URL: https://git.lerch.org/api/actions_pipeline/ # 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
BUILD_TARGET: x86_64-linux-gnu # Needs to be gnu since we're using dlopen BUILD_TARGET: x86_64-linux-gnu # Needs to be gnu since we're using dlopen
BUILD_OPTIMIZATION: ReleaseSafe # Safety is usually a good thing BUILD_OPTIMIZATION: ReleaseSafe # Safety is usually a good thing
jobs: jobs:
@ -14,11 +13,10 @@ jobs:
- run: echo "Triggered by ${{ github.event_name }} event" - run: echo "Triggered by ${{ github.event_name }} event"
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install zig - uses: elerch/setup-zig@v3
run: | with:
curl -s "$ZIG_URL" |tar -xJ -C /usr/local \ version: 0.13.0
&& ln -s /usr/local/zig*/zig /usr/local/bin \ - uses: elerch/zig-action-cache@v1.1.6
&& true
- name: Test - name: Test
run: zig build test -Dtarget="$BUILD_TARGET" run: zig build test -Dtarget="$BUILD_TARGET"
- name: Build - name: Build

View File

@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {
.name = "flexilib", .name = "flexilib",
// In this case the main source file is merely a path, however, in more // In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file. // 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, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void {
.name = "flexilib-sample-lib", .name = "flexilib-sample-lib",
// In this case the main source file is merely a path, however, in more // In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file. // 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, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
@ -44,7 +44,7 @@ pub fn build(b: *std.Build) void {
.name = "flexilib", .name = "flexilib",
// In this case the main source file is merely a path, however, in more // In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file. // 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, .target = target,
.optimize = optimize, .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 // Creates a step for unit testing. This only builds the test executable
// but does not run it. // but does not run it.
const main_tests = b.addTest(.{ const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" }, .root_source_file = b.path("src/main.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
main_tests.linkLibC(); main_tests.linkLibC();
const lib_tests = b.addTest(.{ const lib_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main-lib.zig" }, .root_source_file = b.path("src/main-lib.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });

View File

@ -397,7 +397,7 @@ pub fn main() !void {
// panics. This is because arenas don't actually free memory until // panics. This is because arenas don't actually free memory until
// they deinit. So we need to use the raw allocator here, but the // they deinit. So we need to use the raw allocator here, but the
// arena can be used to store our arguments above // 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.stdin = stdin;
cp.stdout = stdout; cp.stdout = stdout;
cp.stderr = stderr; cp.stderr = stderr;