mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
build: add spirv to test matrix
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
This commit is contained in:
parent
a0eec9ce9e
commit
181a89e728
@ -22,6 +22,11 @@ const crippled = switch (builtin.zig_backend) {
|
||||
pub fn main() void {
|
||||
@disableInstrumentation();
|
||||
|
||||
if (builtin.cpu.arch.isSpirV()) {
|
||||
// SPIR-V needs an special test-runner
|
||||
return;
|
||||
}
|
||||
|
||||
if (crippled) {
|
||||
return mainSimple() catch @panic("test failure\n");
|
||||
}
|
||||
|
||||
@ -140,6 +140,15 @@ const test_targets = blk: {
|
||||
.use_llvm = false,
|
||||
.use_lld = false,
|
||||
},
|
||||
.{
|
||||
.target = std.Target.Query.parse(.{
|
||||
.arch_os_abi = "spirv64-vulkan",
|
||||
.cpu_features = "vulkan_v1_2+int8+int16+int64+float16+float64",
|
||||
}) catch unreachable,
|
||||
.use_llvm = false,
|
||||
.use_lld = false,
|
||||
.skip_modules = &.{ "c-import", "universal-libc", "std" },
|
||||
},
|
||||
// https://github.com/ziglang/zig/issues/13623
|
||||
//.{
|
||||
// .target = .{
|
||||
@ -1583,6 +1592,10 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
||||
run.setName(b.fmt("run test {s}", .{qualified_name}));
|
||||
|
||||
step.dependOn(&run.step);
|
||||
} else if (target.cpu.arch.isSpirV()) {
|
||||
// Don't run spirv binaries
|
||||
_ = these_tests.getEmittedBin();
|
||||
step.dependOn(&these_tests.step);
|
||||
} else {
|
||||
const run = b.addRunArtifact(these_tests);
|
||||
run.skip_foreign_checks = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user