CI: Upload vk.zig as artifact

This commit is contained in:
Robin Voetter
2021-07-02 19:51:14 +02:00
parent a36db3a2f6
commit 844c1564d7
2 changed files with 9 additions and 3 deletions

View File

@@ -38,3 +38,9 @@ jobs:
- name: Build with latest zig & vk.xml - name: Build with latest zig & vk.xml
run: | run: |
zig build -Dvulkan-registry=./vk.xml zig build -Dvulkan-registry=./vk.xml
- name: Archive vk.xml
uses: actions/upload-artifact@v2
with:
name: vk.zig
path: zig-cache/vk.zig

View File

@@ -9,7 +9,7 @@ const IdRenderer = id_render.IdRenderer;
const preamble = const preamble =
\\ \\
\\// This file is generated from the Khronos Vulkan XML API registry \\// This file is generated from the Khronos Vulkan XML API registry by vulkan-zig.
\\ \\
\\const std = @import("std"); \\const std = @import("std");
\\const builtin = @import("builtin"); \\const builtin = @import("builtin");
@@ -444,7 +444,7 @@ fn Renderer(comptime WriterType: type) type {
.device => "Device", .device => "Device",
}; };
try self.writer.print("\npub const {s}Command = enum {{\n", .{dispatch_type_name}); try self.writer.print("pub const {s}Command = enum {{\n", .{dispatch_type_name});
for (self.registry.decls) |decl| { for (self.registry.decls) |decl| {
if (decl.decl_type == .command) { if (decl.decl_type == .command) {
const command = decl.decl_type.command; const command = decl.decl_type.command;
@@ -453,7 +453,7 @@ fn Renderer(comptime WriterType: type) type {
} }
} }
} }
try self.writer.writeAll("};\n\n"); try self.writer.writeAll("};\n");
try self.writer.print( try self.writer.print(
\\fn {s}CommandToString(cmd: {s}Command) []const u8 {{ \\fn {s}CommandToString(cmd: {s}Command) []const u8 {{
\\ return std.meta.tagName(cmd); \\ return std.meta.tagName(cmd);