From 7dc740cca8ea8c8ae31e849c65d9fafa6ec00908 Mon Sep 17 00:00:00 2001 From: Dennis Brakhane Date: Fri, 19 Jul 2024 05:44:43 +0200 Subject: [PATCH] split actions (#893) --- .github/workflows/build-nightly.yml | 23 ++++++++++++++++------- .github/workflows/build-pr.yml | 23 ++++++++++++++++------- .github/workflows/build.yml | 23 ++++++++++++++++------- 3 files changed, 48 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-nightly.yml b/.github/workflows/build-nightly.yml index c097ece24..98332a3db 100644 --- a/.github/workflows/build-nightly.yml +++ b/.github/workflows/build-nightly.yml @@ -10,13 +10,18 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - name: Build + - name: Initial compile shell: cmd run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:OfflineShaderCompiler /m /p:Configuration=Release /p:Platform=x64 + - name: Generate shader dump + shell: cmd + run: | cd "WickedEngine" "../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection - cd .. + - name: Recompile with shader dump + shell: cmd + run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 @@ -58,18 +63,22 @@ jobs: sudo apt update sudo apt install libsdl2-dev ccache - - name: Build + - name: Initial compile run: | mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache CCACHE_NODIRECT=1 make -j$(nproc) - echo "---Generating Shader Dump---" - cd WickedEngine + + - name: Generate shader dump + run: | + cd build/WickedEngine ./offlineshadercompiler spirv rebuild shaderdump mv wiShaderDump.h ../../WickedEngine/ - cd .. - echo "---Rebuilding with ShaderDump---" + + - name: Recompile with shader dump + run: | + cd build CCACHE_NODIRECT=1 make -B -j $(nproc) - name: Move files diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 25f1a1dc2..a966627c6 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -9,13 +9,18 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - name: Build + - name: Initial compile shell: cmd run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:OfflineShaderCompiler /m /p:Configuration=Release /p:Platform=x64 + - name: Generate shader dump + shell: cmd + run: | cd "WickedEngine" "../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection - cd .. + - name: Recompile with shader dump + shell: cmd + run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 @@ -57,18 +62,22 @@ jobs: sudo apt update sudo apt install libsdl2-dev ccache - - name: Build + - name: Initial compile run: | mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache CCACHE_NODIRECT=1 make -j$(nproc) - echo "---Generating Shader Dump---" - cd WickedEngine + + - name: Generate shader dump + run: | + cd build/WickedEngine ./offlineshadercompiler spirv rebuild shaderdump mv wiShaderDump.h ../../WickedEngine/ - cd .. - echo "---Rebuilding with ShaderDump---" + + - name: Recompile with shader dump + run: | + cd build CCACHE_NODIRECT=1 make -B -j $(nproc) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adcc1d9fc..8c14e467f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,13 +10,18 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - name: Build + - name: Initial compile shell: cmd run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:OfflineShaderCompiler /m /p:Configuration=Release /p:Platform=x64 + - name: Generate shader dump + shell: cmd + run: | cd "WickedEngine" "../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection - cd .. + - name: Recompile with shader dump + shell: cmd + run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 @@ -59,18 +64,22 @@ jobs: sudo apt update sudo apt install libsdl2-dev ccache - - name: Build + - name: Initial compile run: | mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache CCACHE_NODIRECT=1 make -j$(nproc) - echo "---Generating Shader Dump---" - cd WickedEngine + + - name: Generate shader dump + run: | + cd build/WickedEngine ./offlineshadercompiler spirv rebuild shaderdump mv wiShaderDump.h ../../WickedEngine/ - cd .. - echo "---Rebuilding with ShaderDump---" + + - name: Recompile with shader dump + run: | + cd build CCACHE_NODIRECT=1 make -B -j $(nproc)