diff --git a/.ci/deploy-windows.sh b/.ci/deploy-windows.sh
index 7a7522f8d4..e109dee9e1 100755
--- a/.ci/deploy-windows.sh
+++ b/.ci/deploy-windows.sh
@@ -1,5 +1,8 @@
#!/bin/sh -ex
+# First let's see print some info about our caches
+"$(cygpath -u "$CCACHE_BIN_DIR")"/ccache.exe --show-stats -v
+
# BUILD_blablabla is Azure specific, so we wrap it for portability
ARTIFACT_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"
diff --git a/.ci/setup-windows.sh b/.ci/setup-windows.sh
index a8fcec17d4..789253d9d5 100755
--- a/.ci/setup-windows.sh
+++ b/.ci/setup-windows.sh
@@ -22,6 +22,7 @@ QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z'
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-1.3.268.0-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
+CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-windows-x86_64.zip"
DEP_URLS=" \
$QT_BASE_URL \
@@ -31,10 +32,11 @@ DEP_URLS=" \
$QT_SVG_URL \
$LLVMLIBS_URL \
$GLSLANG_URL \
- $VULKAN_SDK_URL"
+ $VULKAN_SDK_URL\
+ $CCACHE_URL"
# Azure pipelines doesn't make a cache dir if it doesn't exist, so we do it manually
-[ -d "$CACHE_DIR" ] || mkdir "$CACHE_DIR"
+[ -d "$DEPS_CACHE_DIR" ] || mkdir "$DEPS_CACHE_DIR"
# Pull all the submodules except llvm, since it is built separately and we just download that build
# Note: Tried to use git submodule status, but it takes over 20 seconds
@@ -58,10 +60,9 @@ download_and_verify()
fileName="$4"
for _ in 1 2 3; do
- [ -e "$CACHE_DIR/$fileName" ] || curl -fLo "$CACHE_DIR/$fileName" "$url"
- fileChecksum=$("${algo}sum" "$CACHE_DIR/$fileName" | awk '{ print $1 }')
+ [ -e "$DEPS_CACHE_DIR/$fileName" ] || curl -fLo "$DEPS_CACHE_DIR/$fileName" "$url"
+ fileChecksum=$("${algo}sum" "$DEPS_CACHE_DIR/$fileName" | awk '{ print $1 }')
[ "$fileChecksum" = "$correctChecksum" ] && return 0
- rm "$CACHE_DIR/$fileName"
done
return 1;
@@ -80,11 +81,12 @@ for url in $DEP_URLS; do
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
*glslang*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
+ *ccache*) checksum=$CCACHE_SHA; algo="sha256"; outDir="$CCACHE_BIN_DIR" ;;
*Vulkan*)
# Vulkan setup needs to be run in batch environment
# Need to subshell this or else it doesn't wait
download_and_verify "$url" "$VULKAN_SDK_SHA" "sha256" "$fileName"
- cp "$CACHE_DIR/$fileName" .
+ cp "$DEPS_CACHE_DIR/$fileName" .
_=$(echo "$fileName --accept-licenses --default-answer --confirm-command install" | cmd)
continue
;;
@@ -92,9 +94,15 @@ for url in $DEP_URLS; do
esac
download_and_verify "$url" "$checksum" "$algo" "$fileName"
- 7z x -y "$CACHE_DIR/$fileName" -aos -o"$outDir"
+ 7z x -y "$DEPS_CACHE_DIR/$fileName" -aos -o"$outDir"
done
+# Setup ccache tool
+[ -d "$CCACHE_DIR" ] || mkdir -p "$(cygpath -u "$CCACHE_DIR")"
+CCACHE_SH_DIR=$(cygpath -u "$CCACHE_BIN_DIR")
+mv "$CCACHE_SH_DIR"/ccache-*/* "$CCACHE_SH_DIR"
+cp "$CCACHE_SH_DIR"/ccache.exe "$CCACHE_SH_DIR"/cl.exe
+
# Gather explicit version number and number of commits
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
COMM_COUNT=$(git rev-list --count HEAD)
diff --git a/.github/workflows/rpcs3.yml b/.github/workflows/rpcs3.yml
index 64206bfb92..789e923075 100644
--- a/.github/workflows/rpcs3.yml
+++ b/.github/workflows/rpcs3.yml
@@ -114,7 +114,12 @@ jobs:
QT_DATE: '202501260838'
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
- CACHE_DIR: ./cache
+ CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
+ CCACHE_BIN_DIR: 'C:\ccache_bin'
+ CCACHE_DIR: 'C:\ccache'
+ CCACHE_INODECACHE: 'true'
+ CCACHE_SLOPPINESS: 'time_macros'
+ DEPS_CACHE_DIR: ./dependency_cache
steps:
- name: Checkout repository
@@ -131,15 +136,19 @@ jobs:
shell: bash
run: .ci/get_keys-windows.sh
- - name: Setup Cache
+ - name: Setup Build Ccache
uses: actions/cache@main
with:
- path: ${{ env.CACHE_DIR }}
- key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ hashFiles('llvm.lock') }}-${{ hashFiles('glslang.lock') }}-${{github.run_id}}"
- restore-keys: |
- "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-"
- "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-"
- "${{ runner.os }}-${{ env.COMPILER }}-"
+ path: ${{ env.CCACHE_DIR }}
+ key: "${{ runner.os }}-ccache-${{ env.COMPILER }}-${{github.run_id}}"
+ restore-keys: ${{ runner.os }}-ccache-${{ env.COMPILER }}-
+
+ - name: Setup Dependencies Cache
+ uses: actions/cache@main
+ with:
+ path: ${{ env.DEPS_CACHE_DIR }}
+ key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ env.CCACHE_SHA }}-${{ hashFiles('llvm.lock') }}-${{ hashFiles('glslang.lock') }}"
+ restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
- name: Download and unpack dependencies
shell: bash
@@ -158,7 +167,7 @@ jobs:
uses: microsoft/setup-msbuild@main
- name: Compile RPCS3
- run: msbuild rpcs3.sln /p:Configuration=Release /p:Platform=x64
+ run: msbuild rpcs3.sln /p:Configuration=Release /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_no_debug_info.targets"
- name: Pack up build artifacts
shell: bash
diff --git a/3rdparty/libpng/libpng.vcxproj b/3rdparty/libpng/libpng.vcxproj
index 189db8e307..7e781065a6 100644
--- a/3rdparty/libpng/libpng.vcxproj
+++ b/3rdparty/libpng/libpng.vcxproj
@@ -68,7 +68,6 @@
false
false
pngpriv.h
- true
CompileAsC
true
$(DisableSpecificWarnings)
@@ -91,7 +90,6 @@
false
false
pngpriv.h
- true
CompileAsC
true
false
diff --git a/3rdparty/zlib/zlib.vcxproj b/3rdparty/zlib/zlib.vcxproj
index f0daafdd14..dbc63d51a2 100644
--- a/3rdparty/zlib/zlib.vcxproj
+++ b/3rdparty/zlib/zlib.vcxproj
@@ -84,7 +84,6 @@
$(WarningLevel)
ProgramDatabase
Disabled
- true
true
$(DisableSpecificWarnings);4127;4131;4242;4244
$(TreatWarningAsError)
@@ -102,7 +101,6 @@
true
true
false
- true
true
$(DisableSpecificWarnings);4127;4131;4242;4244
$(TreatWarningAsError)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9dccf5829c..2907949c9f 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -78,7 +78,12 @@ jobs:
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
- CACHE_DIR: ./cache
+ CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
+ CCACHE_BIN_DIR: 'C:\ccache_bin'
+ CCACHE_DIR: 'C:\ccache'
+ CCACHE_INODECACHE: 'true'
+ CCACHE_SLOPPINESS: 'time_macros'
+ DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
@@ -91,13 +96,17 @@ jobs:
- task: Cache@2
inputs:
- key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | llvm.lock | glslang.lock | $(Build.SourceVersion)
- path: $(CACHE_DIR)
- restoreKeys: |
- $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA)
- $(Agent.OS) | $(COMPILER) | "$(QT_VER)"
- $(Agent.OS) | $(COMPILER)
- displayName: Cache
+ key: ccache | $(Agent.OS) | $(COMPILER) | "$(Build.SourceVersion)"
+ path: $(CCACHE_DIR)
+ restoreKeys:
+ ccache | $(Agent.OS) | $(COMPILER)
+ displayName: Build Ccache
+
+ - task: Cache@2
+ inputs:
+ key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock
+ path: $(DEPS_CACHE_DIR)
+ displayName: Dependencies Cache
- bash: .ci/setup-windows.sh
displayName: Download and unpack dependencies
@@ -111,6 +120,7 @@ jobs:
maximumCpuCount: true
platform: x64
configuration: 'Release'
+ msbuildArgs: /p:CLToolPath=$(CCACHE_BIN_DIR) /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="$(Build.SourcesDirectory)\buildfiles\msvc\ci_no_debug_info.targets"
displayName: Compile RPCS3
- bash: .ci/deploy-windows.sh
diff --git a/buildfiles/msvc/ci_no_debug_info.targets b/buildfiles/msvc/ci_no_debug_info.targets
new file mode 100644
index 0000000000..147806ac97
--- /dev/null
+++ b/buildfiles/msvc/ci_no_debug_info.targets
@@ -0,0 +1,8 @@
+
+
+
+
+ None
+
+
+
\ No newline at end of file