File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : test
22on :
33 push :
4+ branches :
5+ - ' master'
46 pull_request :
7+ branches :
8+ - ' master'
59 workflow_dispatch :
610
711permissions :
5054
5155 - name : Run tests
5256 run : ctest --test-dir build --output-on-failure
57+
58+ linux-zig :
59+ runs-on : ubuntu-latest
60+ timeout-minutes : 15
61+ steps :
62+ - uses : actions/checkout@v7.0.0
63+ with :
64+ persist-credentials : false
65+
66+ - uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
67+ with :
68+ version : 0.16.0
69+
70+ - name : Install dependencies
71+ run : sudo apt --update install build-essential libncurses-dev cmake
72+
73+ - name : Build
74+ run : zig build
Original file line number Diff line number Diff line change 1+ const std = @import ("std" );
2+
3+ pub fn build (b : * std.Build ) ! void {
4+ const target = b .standardTargetOptions (.{});
5+ const optimize = b .standardOptimizeOption (.{});
6+
7+ var unibilium = b .createModule (.{
8+ .target = target ,
9+ .optimize = optimize ,
10+ .link_libc = true ,
11+ });
12+
13+ const lib : * std.Build.Step.Compile = b .addLibrary (.{
14+ .name = "unibilium" ,
15+ .linkage = .static ,
16+ .root_module = unibilium ,
17+ });
18+
19+ lib .installHeader (b .path ("unibilium.h" ), "unibilium.h" );
20+
21+ unibilium .addCSourceFiles (.{ .root = b .path ("." ), .files = &.{
22+ "unibilium.c" ,
23+ "uninames.c" ,
24+ "uniutil.c" ,
25+ }, .flags = &.{ "-DTERMINFO_DIRS=\" /etc/terminfo:/usr/share/terminfo\" " , "-DTERMINFO=\" /usr/share/terminfo\" " } });
26+
27+ b .installArtifact (lib );
28+ }
Original file line number Diff line number Diff line change 1+ .{
2+ .name = .unibilium ,
3+ .fingerprint = 0x1d1baa4896ad720 ,
4+ .version = "2.1.3" ,
5+ .paths = .{
6+ "build.zig" ,
7+ "build.zig.zon" ,
8+ "unibilium.h" ,
9+ "unibilium.c" ,
10+ "uninames.c" ,
11+ "uniutil.c" ,
12+ "README.md" ,
13+ "LICENSE" ,
14+ },
15+ }
You can’t perform that action at this time.
0 commit comments