Merge pull request #1206 from damaestro/ci-ccache-fixes
ci: fix ccache effectiveness for Linux and Android builds
This commit is contained in:
@@ -45,11 +45,14 @@ jobs:
|
|||||||
packages: ccache libvulkan-dev glslang-tools spirv-tools libwayland-dev libxrandr-dev ${{matrix.config.packages}} ${{ startsWith(matrix.config.preset, 'server') && env.SERVER_DEPS || ''}}
|
packages: ccache libvulkan-dev glslang-tools spirv-tools libwayland-dev libxrandr-dev ${{matrix.config.packages}} ${{ startsWith(matrix.config.preset, 'server') && env.SERVER_DEPS || ''}}
|
||||||
|
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
uses: hendrikmuhs/ccache-action@v1.2.24
|
||||||
with:
|
with:
|
||||||
key: linux-${{matrix.config.preset}}
|
# The trailing "." keeps one preset's key from being a prefix of another's
|
||||||
job-summary: ""
|
key: linux-${{matrix.config.preset}}.
|
||||||
restore-keys: linux-
|
verbose: 1
|
||||||
|
job-summary: ''
|
||||||
|
evict-old-files: job
|
||||||
|
save: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
|
||||||
- uses: actions/cache@v5
|
- uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
@@ -139,10 +142,14 @@ jobs:
|
|||||||
packages: librsvg2-bin npm
|
packages: librsvg2-bin npm
|
||||||
|
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
uses: hendrikmuhs/ccache-action@v1.2.24
|
||||||
with:
|
with:
|
||||||
key: steam-frame
|
key: steam-frame
|
||||||
job-summary: ""
|
verbose: 1
|
||||||
|
job-summary: ''
|
||||||
|
evict-old-files: job
|
||||||
|
save: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
restore-keys: steam-frame
|
||||||
|
|
||||||
- uses: actions/cache@v5
|
- uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
@@ -289,6 +296,16 @@ jobs:
|
|||||||
${{github.workspace}}/cmake-fetch/*.tgz
|
${{github.workspace}}/cmake-fetch/*.tgz
|
||||||
restore-keys: cmake-android-
|
restore-keys: cmake-android-
|
||||||
|
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.24
|
||||||
|
with:
|
||||||
|
# The trailing "." keeps one build type's key from being a prefix of another's
|
||||||
|
key: android-${{matrix.buildtype}}.
|
||||||
|
verbose: 1
|
||||||
|
job-summary: ''
|
||||||
|
evict-old-files: job
|
||||||
|
save: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
|
||||||
# Gradle distribution and the Android plugin's dependencies.
|
# Gradle distribution and the Android plugin's dependencies.
|
||||||
- uses: actions/cache@v5
|
- uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
@@ -330,6 +347,9 @@ jobs:
|
|||||||
echo "$APK_KEYSTORE_BASE64" | base64 --decode --ignore-garbage > ks.keystore
|
echo "$APK_KEYSTORE_BASE64" | base64 --decode --ignore-garbage > ks.keystore
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
env:
|
||||||
|
# Paths under the workspace are hashed relative to it
|
||||||
|
CCACHE_BASEDIR: ${{github.workspace}}
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(git describe --tags --always | sed "s/^v\([0-9]\)/\1/")
|
VERSION=$(git describe --tags --always | sed "s/^v\([0-9]\)/\1/")
|
||||||
if [ ${{ matrix.buildtype }} = 'Oculus' ]
|
if [ ${{ matrix.buildtype }} = 'Oculus' ]
|
||||||
@@ -367,6 +387,7 @@ jobs:
|
|||||||
-Pwivrn_app_name="$APPNAME" \
|
-Pwivrn_app_name="$APPNAME" \
|
||||||
-Pwivrn_compress_glb=ON \
|
-Pwivrn_compress_glb=ON \
|
||||||
-Pfetchcontent_base_dir=${{github.workspace}}/cmake-fetch \
|
-Pfetchcontent_base_dir=${{github.workspace}}/cmake-fetch \
|
||||||
|
-Pcompiler_launcher=ccache \
|
||||||
assemble${{ matrix.buildtype }}
|
assemble${{ matrix.buildtype }}
|
||||||
|
|
||||||
- name: Upload build dir
|
- name: Upload build dir
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
|||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
|
|||||||
+4
-1
@@ -117,6 +117,8 @@ android {
|
|||||||
def compressGlb = project.hasProperty('wivrn_compress_glb') ? wivrn_compress_glb : 'OFF'
|
def compressGlb = project.hasProperty('wivrn_compress_glb') ? wivrn_compress_glb : 'OFF'
|
||||||
def fetchcontentBaseDir = project.hasProperty('fetchcontent_base_dir') ? ['-DFETCHCONTENT_BASE_DIR=' + fetchcontent_base_dir] : []
|
def fetchcontentBaseDir = project.hasProperty('fetchcontent_base_dir') ? ['-DFETCHCONTENT_BASE_DIR=' + fetchcontent_base_dir] : []
|
||||||
|
|
||||||
|
def compilerLauncher = project.hasProperty('compiler_launcher') ? ['-DCMAKE_C_COMPILER_LAUNCHER=' + compiler_launcher, '-DCMAKE_CXX_COMPILER_LAUNCHER=' + compiler_launcher] : []
|
||||||
|
|
||||||
def asan = use_asan ? 'ON': 'OFF'
|
def asan = use_asan ? 'ON': 'OFF'
|
||||||
def stl = use_asan ? 'c++_shared' : "c++_static"
|
def stl = use_asan ? 'c++_shared' : "c++_static"
|
||||||
|
|
||||||
@@ -146,7 +148,8 @@ android {
|
|||||||
'-DWIVRN_COMPRESS_GLB=' + compressGlb,
|
'-DWIVRN_COMPRESS_GLB=' + compressGlb,
|
||||||
'-DWIVRN_ADDRESS_SANITIZER=' + asan,
|
'-DWIVRN_ADDRESS_SANITIZER=' + asan,
|
||||||
] +
|
] +
|
||||||
fetchcontentBaseDir
|
fetchcontentBaseDir +
|
||||||
|
compilerLauncher
|
||||||
resValue "string", "app_name", project.hasProperty('wivrn_app_name') ? project.wivrn_app_name : "WiVRn Local"
|
resValue "string", "app_name", project.hasProperty('wivrn_app_name') ? project.wivrn_app_name : "WiVRn Local"
|
||||||
abiFilters 'arm64-v8a'//, 'x86_64'
|
abiFilters 'arm64-v8a'//, 'x86_64'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user