Skip to content

Commit 3b83080

Browse files
committed
Use matrix for SwiftShader, disable GNU assembler for Vulkan Loader
1 parent 8b18779 commit 3b83080

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/workflows/swiftshader.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ jobs:
1919
matrix:
2020
env:
2121
- os: ubuntu-22.04
22-
name: Linux
23-
nuke_invoke: ./build.sh
22+
name: Linux x64
23+
nuke_invoke: ./build.sh --matrix-arg linux-x64
24+
- os: ubuntu-22.04
25+
name: Linux ARM32
26+
nuke_invoke: ./build.sh --matrix-arg linux-arm
27+
- os: ubuntu-22.04
28+
name: Linux ARM64
29+
nuke_invoke: ./build.sh --matrix-arg linux-arm64
2430
- os: windows-2022
2531
name: Windows
2632
nuke_invoke: ./build.cmd

build/nuke/Build.Support.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ partial class Build
3838
[Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
3939
bool Warnings;
4040

41+
[Parameter("Matrix job argument e.g. a RID for native builds."), CanBeNull]
42+
string MatrixArg;
43+
4144
static int IndexOfOrThrow(string x, char y)
4245
{
4346
var idx = x.IndexOf(y);

build/nuke/Native/SwiftShader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ partial class Build {
7474
("zig-toolchain-x86_64-linux-gnu.2.17", "linux-x64"),
7575
("zig-toolchain-arm-linux-gnueabihf.2.17", "linux-arm"),
7676
("zig-toolchain-aarch64-linux-gnu.2.17", "linux-arm64"),
77-
})
77+
}.Select(x => string.IsNullOrWhiteSpace(MatrixArg) || x.Item2 == MatrixArg))
7878
{
7979
EnsureCleanDirectory(buildDir);
8080
InheritedShell($"{prepare} {GetCMakeToolchainFlag(triple)} -DCMAKE_C_FLAGS_RELEASE=\"-s -Wl,--undefined-version\" -DCMAKE_CXX_FLAGS_RELEASE=\"-s -Wl,--undefined-version\"", buildDir).AssertZeroExitCode();

build/nuke/Native/VulkanLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ partial class Build {
6868
{
6969
EnsureCleanDirectory(buildDir);
7070

71-
InheritedShell($"{prepare} {GetCMakeToolchainFlag(triple)}", buildDir).AssertZeroExitCode();
71+
InheritedShell($"{prepare} -DUSE_GAS=OFF {GetCMakeToolchainFlag(triple)}", buildDir).AssertZeroExitCode();
7272
InheritedShell(build, buildDir).AssertZeroExitCode();
7373

7474
InheritedShell($"{triple}-strip --strip-unneeded loader/libvulkan.so", buildDir).AssertZeroExitCode();

0 commit comments

Comments
 (0)