From f1d92abfe09622298eba5318bd5793fda641c7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Sat, 5 Oct 2019 12:54:14 +0200 Subject: [PATCH] test it --- .github/workflows/ci.yml | 10 ++++++++++ test/build.zig | 14 ++++++++++++++ test/src/main.zig | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 test/build.zig create mode 100644 test/src/main.zig diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cd56d34 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,10 @@ +name: CI +jobs: + smoke-test: + steps: + - uses: actions/checkout@v1 + - uses: . + inputs: + version: 0.5.0 + - run: zig run src/main.zig + working-directory: test diff --git a/test/build.zig b/test/build.zig new file mode 100644 index 0000000..8d9df1f --- /dev/null +++ b/test/build.zig @@ -0,0 +1,14 @@ +const Builder = @import("std").build.Builder; + +pub fn build(b: *Builder) void { + const mode = b.standardReleaseOptions(); + const exe = b.addExecutable("test", "src/main.zig"); + exe.setBuildMode(mode); + exe.install(); + + const run_cmd = exe.run(); + run_cmd.step.dependOn(b.getInstallStep()); + + const run_step = b.step("run", "Run the app"); + run_step.dependOn(&run_cmd.step); +} diff --git a/test/src/main.zig b/test/src/main.zig new file mode 100644 index 0000000..b8ddde6 --- /dev/null +++ b/test/src/main.zig @@ -0,0 +1,6 @@ +const io = @import("std").io; + +pub fn main() anyerror!void { + const stdout = try io.getStdOut(); + try stdout.write("it works!\n"); +}