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
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

View File

@ -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,
});

View File

@ -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;