diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index d04d57bf6..a3e5f22b9 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -8,55 +8,28 @@ env: CCACHE_MAXSIZE: 500Mi # see https://ccache.dev/manual/latest.html#_precompiled_headers CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime -jobs: +jobs: + windows: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - - name: Restore Ccache database - id: restore-ccache - uses: actions/cache/restore@v4 - with: - path: C:\Users\runneradmin\AppData\Local\ccache - key: ccache-win-${{ github.run_id }} - restore-keys: ccache-win- - - - name: Install Ccache - run: | - curl -sOSL https://github.com/ccache/ccache/releases/download/v$Env:CCACHE_VERSION/ccache-$Env:CCACHE_VERSION-windows-x86_64.zip - unzip -qj ccache-$Env:CCACHE_VERSION-windows-x86_64.zip ccache-$Env:CCACHE_VERSION-windows-x86_64/ccache.exe - mv ccache.exe cl.exe - mv .github/workflows/Directory.Build.props.ghbuild Directory.Build.props - - name: Initial compile shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" - MSBuild WickedEngine.sln /t:OfflineShaderCompiler /m /p:Configuration=Release /p:Platform=x64 - + "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 - - name: Recompile with shader dump shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" - MSBuild WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 - MSBuild WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 - - - name: Save Ccache database - id: save-ccache - if: always() && steps.restore-ccache.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: C:\Users\runneradmin\AppData\Local\ccache - key: ${{ steps.restore-ccache.outputs.cache-primary-key }} - + "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 + - name: Move files shell: cmd run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 529a3cb59..9db8f9fec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,54 +11,26 @@ env: CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime jobs: - + windows: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - - name: Restore Ccache database - id: restore-ccache - uses: actions/cache/restore@v4 - with: - path: C:\Users\runneradmin\AppData\Local\ccache - key: ccache-win-${{ github.run_id }} - restore-keys: ccache-win- - - - name: Install Ccache - run: | - curl -sOSL https://github.com/ccache/ccache/releases/download/v$Env:CCACHE_VERSION/ccache-$Env:CCACHE_VERSION-windows-x86_64.zip - unzip -qj ccache-$Env:CCACHE_VERSION-windows-x86_64.zip ccache-$Env:CCACHE_VERSION-windows-x86_64/ccache.exe - mv ccache.exe cl.exe - mv .github/workflows/Directory.Build.props.ghbuild Directory.Build.props - - name: Initial compile shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" - MSBuild WickedEngine.sln /t:OfflineShaderCompiler /m /p:Configuration=Release /p:Platform=x64 - + "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 - - name: Recompile with shader dump shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" - MSBuild WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 - MSBuild WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 - - - name: Save Ccache database - id: save-ccache - if: always() && steps.restore-ccache.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: C:\Users\runneradmin\AppData\Local\ccache - key: ${{ steps.restore-ccache.outputs.cache-primary-key }} - + "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 + - name: Move files shell: cmd run: |