Skip to content

Commit b3bc3c7

Browse files
committed
Initial commit
1 parent b721809 commit b3bc3c7

4 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/Build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: mlugg/setup-zig@v2
15+
with:
16+
version: 0.15.1
17+
18+
- name: Building
19+
run: zig build
20+
21+
- name: Test
22+
run: zig build test

build.zig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
const lib_mod = b.createModule(.{
8+
.root_source_file = b.path("src/lib.zig"),
9+
.target = target,
10+
.optimize = optimize,
11+
});
12+
13+
const lib = b.addLibrary(.{
14+
.name = "vulkan",
15+
.root_module = lib_mod,
16+
.linkage = .dynamic,
17+
});
18+
19+
b.installArtifact(lib);
20+
21+
const lib_tests = b.addTest(.{
22+
.root_module = lib_mod,
23+
});
24+
25+
const run_lib_tests = b.addRunArtifact(lib_tests);
26+
27+
const test_step = b.step("test", "Run tests");
28+
test_step.dependOn(&run_lib_tests.step);
29+
}

build.zig.zon

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.{
2+
.name = .VulkanDriver,
3+
.version = "0.0.0",
4+
.fingerprint = 0x52cb73649f1107de,
5+
.minimum_zig_version = "0.15.1",
6+
7+
.dependencies = .{},
8+
9+
.paths = .{
10+
"build.zig",
11+
"build.zig.zon",
12+
"src",
13+
"LICENSE",
14+
},
15+
}

src/lib.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const std = @import("std");

0 commit comments

Comments
 (0)