Compare commits
No commits in common. "cbb6116a61eb0b351eb42ac10e654f267b289bf1" and "3b249d62b95856989e7a385f3da14fe68c989d44" have entirely different histories.
cbb6116a61
...
3b249d62b9
|
@ -23,6 +23,7 @@ jobs:
|
|||
- 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: apt update && apt install --no-install-recommends git
|
||||
- run: (cd codegen && zig build test)
|
||||
- run: zig build test
|
||||
- run: zig build -Dtarget=arm-linux
|
||||
- run: zig build -Dtarget=x86_64-windows
|
||||
|
|
19
build.zig
19
build.zig
|
@ -58,22 +58,6 @@ pub fn build(b: *Builder) !void {
|
|||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
// Creates a step for unit testing. This only builds the test executable
|
||||
// but does not run it.
|
||||
const unit_tests = b.addTest(.{
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const run_unit_tests = b.addRunArtifact(unit_tests);
|
||||
|
||||
// Similar to creating the run step earlier, this exposes a `test` step to
|
||||
// the `zig build --help` menu, providing a way for the user to request
|
||||
// running the unit tests.
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&run_unit_tests.step);
|
||||
|
||||
{
|
||||
const cg = b.step("gen", "Generate zig service code from smithy models");
|
||||
|
||||
|
@ -82,7 +66,7 @@ pub fn build(b: *Builder) !void {
|
|||
.root_source_file = .{ .path = "codegen/src/main.zig" },
|
||||
// We need this generated for the host, not the real target
|
||||
// .target = target,
|
||||
.optimize = .ReleaseSafe,
|
||||
// .optimize = optimize,
|
||||
});
|
||||
cg_exe.addModule("smithy", smithy_dep.module("smithy"));
|
||||
var cg_cmd = b.addRunArtifact(cg_exe);
|
||||
|
@ -117,7 +101,6 @@ pub fn build(b: *Builder) !void {
|
|||
|
||||
cg.dependOn(&cg_cmd.step);
|
||||
exe.step.dependOn(cg);
|
||||
unit_tests.step.dependOn(cg);
|
||||
}
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
|
Loading…
Reference in New Issue
Block a user