mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
feature: Store CCACHE cache in CI Cache.
This commit is contained in:
parent
e29c55dd98
commit
aa20f384dc
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
@ -6,15 +7,16 @@
|
||||||
# Exit on error, rather than continuing with the rest of the script.
|
# Exit on error, rather than continuing with the rest of the script.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Old versions of ccache don't include the -v argument. Keep it only with -s
|
||||||
ccache -s
|
ccache -s
|
||||||
|
|
||||||
mkdir build || true && cd build
|
mkdir build || true && cd build
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-DBoost_USE_STATIC_LIBS=ON \
|
-DBoost_USE_STATIC_LIBS=ON \
|
||||||
|
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
|
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DDISPLAY_VERSION=$1 \
|
-DDISPLAY_VERSION=$1 \
|
||||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
|
||||||
|
@ -24,6 +26,7 @@ cmake .. \
|
||||||
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
||||||
-DSUYU_ENABLE_LTO=ON \
|
-DSUYU_ENABLE_LTO=ON \
|
||||||
-DSUYU_CRASH_DUMPS=ON \
|
-DSUYU_CRASH_DUMPS=ON \
|
||||||
|
-DUSE_CCACHE=ON \
|
||||||
-GNinja
|
-GNinja
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -39,3 +39,7 @@ Thumbs.db
|
||||||
|
|
||||||
# Local Gitlab CI Runner
|
# Local Gitlab CI Runner
|
||||||
.gitlab-ci-local/
|
.gitlab-ci-local/
|
||||||
|
|
||||||
|
# clangd compile_commands.json
|
||||||
|
# https://clangd.llvm.org/installation.html#project-setup
|
||||||
|
compile_commands.json
|
|
@ -1,6 +1,21 @@
|
||||||
stages:
|
stages:
|
||||||
- format
|
- format
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# https://docs.gitlab.com/ee/ci/runners/configure_runners.html
|
||||||
|
TRANSFER_METER_FREQUENCY: "2s"
|
||||||
|
ARTIFACT_COMPRESSION_LEVEL: "fast"
|
||||||
|
CACHE_COMPRESSION_LEVEL: "fastest"
|
||||||
|
CACHE_REQUEST_TIMEOUT: 5
|
||||||
|
# Use FASTZIP for faster compression in cache and artifacts
|
||||||
|
# https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
|
||||||
|
FF_USE_FASTZIP: true
|
||||||
|
|
||||||
|
# Our Variables
|
||||||
|
CACHE_DIR: "$CI_PROJECT_DIR/ccache"
|
||||||
|
CCACHE_DIR: $CACHE_DIR
|
||||||
|
|
||||||
#CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
|
#CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
|
||||||
clang-format:
|
clang-format:
|
||||||
stage: format
|
stage: format
|
||||||
|
@ -10,11 +25,19 @@ clang-format:
|
||||||
script:
|
script:
|
||||||
- git submodule update --init --depth 1 --recursive
|
- git submodule update --init --depth 1 --recursive
|
||||||
- bash .ci/scripts/format/script.sh
|
- bash .ci/scripts/format/script.sh
|
||||||
|
|
||||||
#LINUX BUILD - BUILDS LINUX APPIMAGE
|
#LINUX BUILD - BUILDS LINUX APPIMAGE
|
||||||
build-linux:
|
build-linux:
|
||||||
stage: build
|
stage: build
|
||||||
image: registry.gitlab.com/ddutchie/ci-docker:linux-x64
|
image: registry.gitlab.com/ddutchie/ci-docker:linux-x64
|
||||||
resource_group: linux-ci
|
resource_group: linux-ci
|
||||||
|
cache:
|
||||||
|
key: "$CI_COMMIT_REF_NAME-ccache"
|
||||||
|
paths:
|
||||||
|
- $CACHE_DIR
|
||||||
|
before_script:
|
||||||
|
- mkdir -p $CACHE_DIR
|
||||||
|
- ls -la $CACHE_DIR
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
GIT_SUBMODULE_DEPTH: 1
|
GIT_SUBMODULE_DEPTH: 1
|
||||||
|
@ -25,6 +48,7 @@ build-linux:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- artifacts/*
|
- artifacts/*
|
||||||
|
|
||||||
#ANDROID BUILD - BUILDS APK
|
#ANDROID BUILD - BUILDS APK
|
||||||
android:
|
android:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -39,3 +63,4 @@ android:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- artifacts/*
|
- artifacts/*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue