Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
282fa48
ci: add Linux x64 and macOS ARM64 to SwiftShader NuGet package build
xen2 Apr 8, 2026
d0efc77
fix: YAML syntax error in dep-freetype heredoc
xen2 Apr 14, 2026
ec482c0
test: remove hardcoded RuntimeIdentifier from test csprojs
xen2 Apr 9, 2026
eb506b0
fix: cross-platform SwiftShader with lazy SDL init
xen2 Apr 9, 2026
9a475d7
feat: add headless game context for windowless GPU testing
xen2 Apr 9, 2026
dc902bd
fix: use forward slashes in pack-assets command for Linux compatibility
xen2 Apr 8, 2026
8c41643
ci: add Linux Vulkan GPU test workflow (build on Windows, test on Linux)
xen2 Apr 9, 2026
8e83d2d
fix: cross-platform path separators in gold image paths
xen2 Apr 9, 2026
865c404
fix: skip Avalonia initialization on headless Linux (no DISPLAY)
xen2 Apr 9, 2026
329b9c7
fix: gracefully handle audio initialization failure on platforms with…
xen2 Apr 9, 2026
7bc8aaf
fix: proper cross-platform file locking using fcntl/OFD P/Invoke
xen2 Apr 9, 2026
9c061df
fix: use AssemblyName for test output path, set before .NET SDK import
xen2 Apr 9, 2026
59cf38c
refactor: rename AppContextType.Desktop to DesktopWinForms, DesktopWp…
xen2 Apr 9, 2026
0475204
fix: disable cross-targeting for test projects to fix incremental bui…
xen2 Apr 10, 2026
4fb2d24
fix: suppress native crash dialogs and use Platform.Type for SwiftSha…
xen2 Apr 10, 2026
8aa5e1a
test: add Linux Vulkan SwiftShader gold images for Graphics and UI tests
xen2 Apr 11, 2026
e15444a
ci: add Linux test workflows for Simple and Game tests
xen2 Apr 11, 2026
5cf2a39
fix: always use non-blocking file locks on Unix to prevent hangs
xen2 Apr 11, 2026
11f5593
ci: register SwiftShader ICD for Linux test runners
xen2 Apr 11, 2026
838d42d
fix: cross-platform test fixes for ProcessExtensions and YAML line en…
xen2 Apr 11, 2026
47a846b
ci: add 20min timeout to Linux test jobs
xen2 Apr 11, 2026
b6def73
feat: add detailed stats to image comparison failures (histogram, PSN…
xen2 Apr 12, 2026
fd670bd
ci: add TRX test reporting with dorny/test-reporter, update Linux gol…
xen2 Apr 12, 2026
a911661
fix: skip Windows drive letter UPath tests on Linux with SkippableFact
xen2 Apr 12, 2026
6dbbf1d
test: fix artifact permissions and add xvfb to open windows
xen2 Apr 13, 2026
e2a02f6
fix: only report image comparison failures when ALL gold images fail
xen2 Apr 13, 2026
52ffe74
ci: upload test artifacts for Linux Game Common job
xen2 Apr 13, 2026
4dba58b
test: skip known failing tests on Linux (FreeImage BMP, 3D textures, …
xen2 Apr 13, 2026
e0d05b7
test: promoted gold images for Vulkan Linux
xen2 Apr 13, 2026
99f0869
feat: add CompareGold image comparison tool
xen2 Apr 13, 2026
80f2ae5
fix: null check DepthStencilBuffer in GraphicsPresenter.Resize
xen2 Apr 13, 2026
64150dd
ci: use -r win-x64/linux-x64 for all test builds to reduce artifact size
xen2 Apr 14, 2026
33a89f7
fix: work around Silk.NET missing Ubuntu in RID fallback list for nat…
xen2 Apr 14, 2026
cbd70c4
test: Bumped SwiftShader to 2026.4.14 (no target files)
xen2 Apr 14, 2026
5dfc7b8
fix: Add a lib prefix if dynamic library could not be found on Linux/…
xen2 Apr 14, 2026
5731b2e
build: filter and flatten runtimes/ native assets when RuntimeIdentif…
xen2 Apr 14, 2026
8828556
fix: register DllImportResolver for preloaded native libs
xen2 Apr 14, 2026
4606780
fix: use global AssemblyLoadContext resolver for preloaded native lib…
xen2 Apr 14, 2026
ad4f580
feat: add thresholds.jsonc for per-image comparison tolerance
xen2 Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/dep-freetype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,12 @@ jobs:

# Version info
COMMIT=$(git -C freetype-src rev-parse HEAD)
cat > $OUT/VERSION.txt <<EOF
FreeType ${{ github.event.inputs.freetype-version }}
Repository: https://github.com/freetype/freetype
Commit: $COMMIT
Built: $(date -u +%Y-%m-%d)
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
EOF
printf 'FreeType %s\nRepository: https://github.com/freetype/freetype\nCommit: %s\nBuilt: %s\nWorkflow: %s\n' \
"${{ github.event.inputs.freetype-version }}" \
"$COMMIT" \
"$(date -u +%Y-%m-%d)" \
"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
> $OUT/VERSION.txt

- name: List contents
run: find freetype-out -type f | sort
Expand Down
141 changes: 132 additions & 9 deletions .github/workflows/dep-swiftshader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: false

jobs:
build:
build-windows:
name: Build SwiftShader (Windows x64)
runs-on: windows-2025-vs2026
env:
Expand All @@ -28,17 +28,140 @@ jobs:
shell: pwsh
run: |
cmake -S swiftshader-src -B swiftshader-build -Thost=x64 -DSWIFTSHADER_BUILD_TESTS=OFF -DSWIFTSHADER_BUILD_BENCHMARKS=OFF
cmake --build swiftshader-build --config RelWithDebInfo --target vk_swiftshader
cmake --build swiftshader-build --config Release --target vk_swiftshader

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: swiftshader-win-x64
path: |
swiftshader-build/**/vk_swiftshader.dll
swiftshader-build/**/vk_swiftshader_icd.json

build-linux:
name: Build SwiftShader (Linux x64)
runs-on: ubuntu-24.04
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout SwiftShader
uses: actions/checkout@v4
with:
repository: google/swiftshader
submodules: recursive
path: swiftshader-src

- name: Build
run: |
cmake -S swiftshader-src -B swiftshader-build -DCMAKE_BUILD_TYPE=Release -DSWIFTSHADER_BUILD_TESTS=OFF -DSWIFTSHADER_BUILD_BENCHMARKS=OFF
cmake --build swiftshader-build --target vk_swiftshader -- -j$(nproc)

- name: Collect build output
run: |
mkdir -p swiftshader-out
find swiftshader-build -maxdepth 2 -name "libvk_swiftshader.so" -exec cp {} swiftshader-out/ \;
find swiftshader-build -maxdepth 2 -name "vk_swiftshader_icd.json" -exec cp {} swiftshader-out/ \;

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: swiftshader-linux-x64
path: swiftshader-out/

build-macos:
name: Build SwiftShader (macOS ARM64)
runs-on: macos-15
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout SwiftShader
uses: actions/checkout@v4
with:
repository: google/swiftshader
submodules: recursive
path: swiftshader-src

- name: Build
run: |
cmake -S swiftshader-src -B swiftshader-build -DCMAKE_BUILD_TYPE=Release -DSWIFTSHADER_BUILD_TESTS=OFF -DSWIFTSHADER_BUILD_BENCHMARKS=OFF
cmake --build swiftshader-build --target vk_swiftshader -- -j$(sysctl -n hw.ncpu)

- name: Collect build output
run: |
mkdir -p swiftshader-out
find swiftshader-build -maxdepth 2 -name "libvk_swiftshader.dylib" -exec cp {} swiftshader-out/ \;
find swiftshader-build -maxdepth 2 -name "vk_swiftshader_icd.json" -exec cp {} swiftshader-out/ \;

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: swiftshader-osx-arm64
path: swiftshader-out/

pack:
name: Pack & Publish NuGet
needs: [build-windows, build-linux, build-macos]
runs-on: windows-2025-vs2026
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout SwiftShader (for commit hash)
uses: actions/checkout@v4
with:
repository: google/swiftshader
path: swiftshader-src
fetch-depth: 1

- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: swiftshader-win-x64
path: artifacts/win-x64

- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: swiftshader-linux-x64
path: artifacts/linux-x64

- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: swiftshader-osx-arm64
path: artifacts/osx-arm64

- name: Prepare package contents
shell: pwsh
run: |
$destDir = "build/deps/swiftshader"
Copy-Item swiftshader-build/RelWithDebInfo/vk_swiftshader.dll $destDir/
# ICD JSON is generated in a platform-specific directory by cmake
$icdJson = Get-ChildItem -Recurse -Path swiftshader-build -Filter vk_swiftshader_icd.json | Select-Object -First 1
if (-not $icdJson) { throw "vk_swiftshader_icd.json not found in build output" }
Copy-Item $icdJson.FullName $destDir/

# Windows
New-Item -Path "$destDir/win-x64" -ItemType Directory -Force | Out-Null
$winDll = Get-ChildItem -Recurse -Path artifacts/win-x64 -Filter vk_swiftshader.dll | Select-Object -First 1
Copy-Item $winDll.FullName "$destDir/win-x64/"
$winIcd = Get-ChildItem -Recurse -Path artifacts/win-x64 -Filter vk_swiftshader_icd.json | Select-Object -First 1
Copy-Item $winIcd.FullName "$destDir/win-x64/"

# Linux
New-Item -Path "$destDir/linux-x64" -ItemType Directory -Force | Out-Null
$linuxSo = Get-ChildItem -Recurse -Path artifacts/linux-x64 -Filter libvk_swiftshader.so | Select-Object -First 1
Copy-Item $linuxSo.FullName "$destDir/linux-x64/"
$linuxIcd = Get-ChildItem -Recurse -Path artifacts/linux-x64 -Filter vk_swiftshader_icd.json | Select-Object -First 1
Copy-Item $linuxIcd.FullName "$destDir/linux-x64/"

# macOS
New-Item -Path "$destDir/osx-arm64" -ItemType Directory -Force | Out-Null
$macDylib = Get-ChildItem -Recurse -Path artifacts/osx-arm64 -Filter libvk_swiftshader.dylib | Select-Object -First 1
Copy-Item $macDylib.FullName "$destDir/osx-arm64/"
$macIcd = Get-ChildItem -Recurse -Path artifacts/osx-arm64 -Filter vk_swiftshader_icd.json | Select-Object -First 1
Copy-Item $macIcd.FullName "$destDir/osx-arm64/"

- name: Pack NuGet
shell: pwsh
Expand All @@ -52,15 +175,15 @@ jobs:
-OutputDirectory nupkg
echo "PACKAGE_VERSION=$version" >> $env:GITHUB_ENV

- name: Upload artifact
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: Stride.Dependencies.SwiftShader.nupkg
path: nupkg/*.nupkg

publish:
name: Sign & Publish to NuGet.org
needs: build
needs: pack
runs-on: windows-2025-vs2026
environment: production
steps:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

permissions:
checks: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -105,3 +109,17 @@ jobs:
secrets: inherit
with:
build-type: Debug

Linux-Tests-Simple:
needs: Linux-Runtime
uses: ./.github/workflows/test-linux-simple.yml
secrets: inherit
with:
build-type: Debug

Linux-Tests-Game:
needs: Linux-Runtime
uses: ./.github/workflows/test-linux-game.yml
secrets: inherit
with:
build-type: Debug
Loading
Loading