Skip to content

Commit

Permalink
Merge branch 'feature/regen' into ci/feature/regen/swiftshader_bins
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Oct 30, 2024
2 parents 4b8fbd7 + 8de79f1 commit 0febc8d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/swiftshader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ jobs:
matrix:
env:
- os: ubuntu-22.04
name: Linux
name: Linux x64
nuke_invoke: ./build.sh
nuke_extra: --matrix-arg linux-x64
- os: ubuntu-22.04
name: Linux ARM32
nuke_invoke: ./build.sh
nuke_extra: --matrix-arg linux-arm
- os: ubuntu-22.04
name: Linux ARM64
nuke_invoke: ./build.sh
nuke_extra: --matrix-arg linux-arm64
- os: windows-2022
name: Windows
nuke_invoke: ./build.cmd
Expand Down Expand Up @@ -58,9 +67,9 @@ jobs:
6.0.201
7.0.*
- name: Install Zig
if: ${{ matrix.env.name == 'Linux' }}
if: ${{ matrix.env.os == 'ubuntu-22.04' }}
uses: goto-bus-stop/setup-zig@v2
- name: Build SwiftShader
run: ${{ matrix.env.nuke_invoke }} SwiftShader
run: ${{ matrix.env.nuke_invoke }} SwiftShader ${{ matrix.env.nuke_extra }}
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"VSCode"
]
},
"MatrixArg": {
"type": "string",
"description": "Matrix job argument e.g. a RID for native builds"
},
"MsbuildProperties": {
"type": "array",
"description": "Extra properties passed to MSBuild commands",
Expand Down
3 changes: 3 additions & 0 deletions build/nuke/Build.Support.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ partial class Build
[Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
bool Warnings;

[Parameter("Matrix job argument e.g. a RID for native builds."), CanBeNull]
string MatrixArg;

static int IndexOfOrThrow(string x, char y)
{
var idx = x.IndexOf(y);
Expand Down
2 changes: 1 addition & 1 deletion build/nuke/Native/SwiftShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ partial class Build {
("zig-toolchain-x86_64-linux-gnu.2.17", "linux-x64"),
("zig-toolchain-arm-linux-gnueabihf.2.17", "linux-arm"),
("zig-toolchain-aarch64-linux-gnu.2.17", "linux-arm64"),
})
}.Where(x => string.IsNullOrWhiteSpace(MatrixArg) || x.Item2 == MatrixArg))
{
EnsureCleanDirectory(buildDir);
InheritedShell($"{prepare} {GetCMakeToolchainFlag(triple)} -DCMAKE_C_FLAGS_RELEASE=\"-s -Wl,--undefined-version\" -DCMAKE_CXX_FLAGS_RELEASE=\"-s -Wl,--undefined-version\"", buildDir).AssertZeroExitCode();
Expand Down
4 changes: 3 additions & 1 deletion build/nuke/Native/VulkanLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
using static Nuke.Common.Tools.GitHub.GitHubTasks;

partial class Build {
// TODO the dishes

AbsolutePath VulkanLoaderPath => RootDirectory / "build" / "submodules" / "Vulkan-Loader";

Target VulkanLoader => CommonTarget
Expand Down Expand Up @@ -68,7 +70,7 @@ partial class Build {
{
EnsureCleanDirectory(buildDir);
InheritedShell($"{prepare} {GetCMakeToolchainFlag(triple)}", buildDir).AssertZeroExitCode();
InheritedShell($"{prepare} -DUSE_GAS=OFF {GetCMakeToolchainFlag(triple)}", buildDir).AssertZeroExitCode();
InheritedShell(build, buildDir).AssertZeroExitCode();
InheritedShell($"{triple}-strip --strip-unneeded loader/libvulkan.so", buildDir).AssertZeroExitCode();
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0febc8d

Please sign in to comment.