add sample test/update build to show all configurations should work
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 1m18s

This commit is contained in:
Emil Lerch 2023-10-28 09:33:42 -07:00
parent 4006b43679
commit 3d969fb331
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
3 changed files with 11 additions and 4 deletions

View File

@ -21,8 +21,11 @@ jobs:
- run: wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - run: wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
- run: tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - run: tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
- run: ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig - run: ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig
- run: zig build - run: zig build
- run: zig build -Dtarget=arm-linux # we want to know we can build for 32 bit - run: zig build -Dtarget=arm-linux # we want to know we can build for 32 bit
- run: zig build -Dtarget=wasm32-wasi # Cloudflare requires wasm
- run: zig build -Dtarget=aarch64-linux-musl # AWS Lambda uses this
- run: zig build test
- name: Notify - name: Notify
uses: https://git.lerch.org/lobo/action-notify-ntfy@v2 uses: https://git.lerch.org/lobo/action-notify-ntfy@v2
if: always() if: always()

View File

@ -4,8 +4,8 @@
.dependencies = .{ .dependencies = .{
.universal_lambda_build = .{ .universal_lambda_build = .{
.url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/5376b6a725d406b0b9581eb65505a852730d6a98.tar.gz", .url = "https://git.lerch.org/lobo/universal-lambda-zig/archive/07366606696081f324591b66ab7a9a176a38424c.tar.gz",
.hash = "1220fb872507639f1d42f11a50f33dbdc0343a888c6592892a38ba210e6e0ae6285c", .hash = "122049daa19f61d778a79ffb82c64775ca5132ee5c4797d7f7d76667ab82593917cd",
}, },
.flexilib = .{ .flexilib = .{
.url = "https://git.lerch.org/lobo/flexilib/archive/3d3dab9c792651477932e2b61c9f4794ac694dcb.tar.gz", .url = "https://git.lerch.org/lobo/flexilib/archive/3d3dab9c792651477932e2b61c9f4794ac694dcb.tar.gz",

View File

@ -19,3 +19,7 @@ fn handler(allocator: std.mem.Allocator, event_data: []const u8, context: interf
try writer.print("Event data passed to handler: {s}\n", .{event_data}); try writer.print("Event data passed to handler: {s}\n", .{event_data});
return al.items; return al.items;
} }
test "simple test" {
try std.testing.expectEqual(@as(usize, 4), 2 + 2);
}