-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,10 +92,69 @@ jobs: | |
comment-id: ${{ github.event.comment.id }} | ||
reactions: 'rocket' | ||
|
||
# Test job. | ||
# ------------------------------------- Toolchain setup ------------------------------------- | ||
setup: | ||
name: run-setup | ||
needs: verify | ||
if: ${{ contains(needs.verify.outputs.commands, 'test') || contains(needs.verify.outputs.commands, 'tidy') }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
name: [ windows-latest ] | ||
include: | ||
- name: windows-latest | ||
os: windows-latest | ||
#- name: ubuntu-latest | ||
# os: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Vulkan SDK | ||
uses: jakoch/[email protected] | ||
with: | ||
vulkan_version: ${{ env.vulkanSdkVersion }} | ||
install_runtime: true | ||
cache: true | ||
stripdown: true | ||
|
||
- name: Lookup Mesa3D cache | ||
uses: actions/cache@v4 | ||
id: lookup-mesa | ||
with: | ||
key: ${{ matrix.os }}-mesa3d-${{ env.mesaDriverVersion }} | ||
path: ${{ github.workspace }}/dep/mesa/ | ||
lookup-only: true | ||
|
||
- name: Download Mesa3D driver | ||
uses: robinraju/[email protected] | ||
if: steps.lookup-mesa.outputs.cache-hit != 'true' | ||
with: | ||
repository: 'pal1000/mesa-dist-win' | ||
tag: '${{ env.mesaDriverVersion }}' | ||
fileName: 'mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z' | ||
out-file-path: 'dep/mesa/' # ${{ github.workspace }} is prefixed automatically. | ||
extract: false # 7zip is not supported by this extension, so we have to do it on our own later. | ||
|
||
- name: Decompress Mesa3D driver | ||
working-directory: '${{ github.workspace }}/dep/mesa/' | ||
if: steps.lookup-mesa.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
7z x '${{ github.workspace }}/dep/mesa/mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z' | ||
rm '${{ github.workspace }}/dep/mesa/mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z' | ||
- name: Cache Mesa3D | ||
uses: actions/cache/save@v4 | ||
if: steps.lookup-mesa.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ github.workspace }}/dep/mesa/ | ||
key: ${{ matrix.os }}-mesa3d-${{ env.mesaDriverVersion }} | ||
|
||
# ------------------------------------- Test job ------------------------------------- | ||
test: | ||
name: run-tests | ||
needs: verify | ||
needs: [ verify, setup ] | ||
if: ${{ contains(needs.verify.outputs.commands, 'test') }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
|
@@ -168,7 +227,7 @@ jobs: | |
submodules: true | ||
|
||
- name: Setup Vulkan SDK | ||
uses: jakoch/[email protected].0 | ||
uses: jakoch/[email protected].4 | ||
with: | ||
vulkan_version: ${{ env.vulkanSdkVersion }} | ||
install_runtime: true | ||
|
@@ -182,34 +241,25 @@ jobs: | |
choco install opencppcoverage | ||
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH | ||
- name: Install LLVM and Clang | ||
if: ${{ matrix.compiler == 'clang' }} | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: "19" | ||
- name: Update LLVM | ||
if: ${{ matrix.compiler }} == 'clang' | ||
run: choco upgrade llvm | ||
|
||
- name: Setup build and test environment | ||
id: setup-environment | ||
shell: bash | ||
run: | | ||
echo "VCPKG_FEATURE_FLAGS=manifests" >> $env:GITHUB_ENV | ||
echo "C:\msys64\ucrt64\bin" >> $GITHUB_PATH | ||
#echo "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime" >> $GITHUB_PATH # Somehow does not get picked up by the MSVC development environment. | ||
cp "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime\x64\vulkan-1.dll" "C:\Windows\System32\vulkan-1.dll" | ||
cp "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime\x86\vulkan-1.dll" "C:\Windows\SysWOW64\vulkan-1.dll" | ||
- name: Download Mesa3D driver | ||
uses: robinraju/[email protected] | ||
- name: Restore Mesa3D | ||
uses: actions/cache/restore@v4 | ||
with: | ||
repository: 'pal1000/mesa-dist-win' | ||
tag: '${{ env.mesaDriverVersion }}' | ||
fileName: 'mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z' | ||
out-file-path: 'dep/mesa/' # ${{ github.workspace }} is prefixed automatically. | ||
extract: false # 7zip is not supported by this extension, so we have to do it on our own later. | ||
|
||
- name: Decompress Mesa3D driver | ||
working-directory: '${{ github.workspace }}/dep/mesa/' | ||
run: | | ||
7z x '${{ github.workspace }}/dep/mesa/mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z' | ||
path: ${{ github.workspace }}/dep/mesa/ | ||
key: ${{ matrix.os }}-mesa3d-${{ env.mesaDriverVersion }} | ||
|
||
- name: Install and Test Mesa3D driver | ||
working-directory: '${{ github.workspace }}/dep/mesa/' | ||
|
@@ -222,24 +272,18 @@ jobs: | |
reg add "HKLM\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers" /v 'C:\VulkanSDK\${{ env.vulkanSdkVersion }}\Bin32\VkLayer_khronos_validation.json' /t REG_DWORD /d 0 /f /reg:64 | ||
C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime\x64\vulkaninfo.exe --summary | ||
- name: Retrieve latest CMake build | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Restore or build vcpkg | ||
uses: lukka/run-vcpkg@v10 | ||
with: | ||
vcpkgDirectory: '${{ github.workspace }}/src/Modules/vcpkg' | ||
vcpkgJsonGlob: '${{ github.workspace }}/src/vcpkg.json' | ||
|
||
- name: Build Runtime and Tests | ||
id: build-with-cmake | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
cmakeListsTxtPath: '${{ github.workspace }}/src/CMakeLists.txt' | ||
configurePreset: '${{ matrix.configuration }}' | ||
buildPreset: '${{ matrix.configuration }}' | ||
#testPreset: '${{ matrix.configuration }}' | ||
#testPresetAdditionalArgs: "[ '--output-on-failure', '--timeout', '10' ]" | ||
|
||
- name: Run tests | ||
working-directory: "${{ github.workspace }}/out/build/${{ matrix.configuration }}" | ||
|
@@ -303,10 +347,10 @@ jobs: | |
output: | | ||
{ "summary": ${{ toJSON(env.SUMMARY) }} } | ||
# Run static code analysis | ||
# ------------------------------------- Static code analysis ------------------------------------- | ||
tidy: | ||
name: run-tidy | ||
needs: verify | ||
needs: [ verify, setup ] | ||
if: ${{ contains(needs.verify.outputs.commands, 'tidy') }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
|
@@ -373,19 +417,17 @@ jobs: | |
submodules: true | ||
|
||
- name: Setup Vulkan SDK | ||
uses: jakoch/[email protected].0 | ||
uses: jakoch/[email protected].4 | ||
with: | ||
vulkan_version: ${{ env.vulkanSdkVersion }} | ||
install_runtime: true | ||
cache: true | ||
stripdown: false | ||
|
||
- name: Install LLVM and Clang | ||
if: ${{ matrix.compiler == 'clang' }} | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: "19" | ||
|
||
- name: Update LLVM | ||
if: ${{ matrix.compiler }} == 'clang' | ||
run: choco upgrade llvm | ||
|
||
- name: Setup build and test environment | ||
id: setup-environment | ||
shell: bash | ||
|
@@ -394,6 +436,7 @@ jobs: | |
#echo "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime" >> $GITHUB_PATH # Somehow does not get picked up by the MSVC development environment. | ||
cp "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime\x64\vulkan-1.dll" "C:\Windows\System32\vulkan-1.dll" | ||
cp "C:\VulkanSDK\${{ env.vulkanSdkVersion }}\runtime\x86\vulkan-1.dll" "C:\Windows\SysWOW64\vulkan-1.dll" | ||
echo "C:\msys64\ucrt64\bin" >> $GITHUB_PATH | ||
- name: Retrieve latest CMake build | ||
uses: lukka/get-cmake@latest | ||
|
@@ -404,13 +447,12 @@ jobs: | |
vcpkgDirectory: '${{ github.workspace }}/src/Modules/vcpkg' | ||
vcpkgJsonGlob: '${{ github.workspace }}/src/vcpkg.json' | ||
|
||
- name: Build Runtime and Tests | ||
- name: Build Runtime and Samples | ||
id: build-with-cmake | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
cmakeListsTxtPath: '${{ github.workspace }}/src/CMakeLists.txt' | ||
configurePreset: '${{ matrix.configuration }}' | ||
configurePresetAdditionalArgs: "['-DLITEFX_BUILD_EXAMPLES=ON']" | ||
buildPreset: '${{ matrix.configuration }}' | ||
|
||
- name: Collect code analysis results | ||
|