SourceFile -> LazyFile (#75)

wch-ch32v003
Matt Knight 1 year ago committed by GitHub
parent 1cef56ad9d
commit 695d3dc0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,22 @@
name: Build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
linux-latest,
windows-latest,
macos-latest,
]
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v1.3.0
with:
version: master
- name: Build and Unit Test
run: zig build test -Doptimize=ReleaseSmall

@ -2,7 +2,7 @@ const std = @import("std");
const Builder = std.build.Builder; const Builder = std.build.Builder;
const Pkg = std.build.Pkg; const Pkg = std.build.Pkg;
const comptimePrint = std.fmt.comptimePrint; const comptimePrint = std.fmt.comptimePrint;
const FileSource = std.build.FileSource; const LazyPath = std.build.LazyPath;
const microzig = @import("microzig"); const microzig = @import("microzig");
@ -17,7 +17,7 @@ pub const BuildOptions = struct {
pub const PicoExecutableOptions = struct { pub const PicoExecutableOptions = struct {
name: []const u8, name: []const u8,
source_file: FileSource, source_file: LazyPath,
optimize: std.builtin.OptimizeMode = .Debug, optimize: std.builtin.OptimizeMode = .Debug,
}; };
@ -52,7 +52,7 @@ pub fn build(b: *Builder) !void {
}, },
.optimize = optimize, .optimize = optimize,
}); });
pio_tests.addIncludePath("src/hal/pio/assembler"); pio_tests.addIncludePath(.{ .path = "src/hal/pio/assembler" });
const test_step = b.step("test", "run unit tests"); const test_step = b.step("test", "run unit tests");
test_step.dependOn(&b.addRunArtifact(pio_tests).step); test_step.dependOn(&b.addRunArtifact(pio_tests).step);

@ -3,8 +3,8 @@
.version = "0.0.0", .version = "0.0.0",
.dependencies = .{ .dependencies = .{
.microzig = .{ .microzig = .{
.url = "https://github.com/ZigEmbeddedGroup/microzig/archive/9392fe0f7bddde26155c181ab80b70097b49c791.tar.gz", .url = "https://github.com/ZigEmbeddedGroup/microzig/archive/d4a48f65fac24dcfe789d217a9154086b6a011e5.tar.gz",
.hash = "1220326148075cd017425e04356329c33c3e794d31a54bdafa46521fcfcc55b422a3", .hash = "1220fd3ad4f6a88f111791cb80de1fc388d0a51114ab376f2bf8351cd176747fa303",
}, },
.args = .{ .args = .{
.url = "https://github.com/MasterQ32/zig-args/archive/91d1e89fb89a4d01dec7c9aec95b0a324080ebcc.tar.gz", .url = "https://github.com/MasterQ32/zig-args/archive/91d1e89fb89a4d01dec7c9aec95b0a324080ebcc.tar.gz",

Loading…
Cancel
Save