From 5aa53d12df35a461fb34d86bfc5a5c909d607c2a Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 17 Mar 2024 00:15:34 +0000 Subject: [PATCH] feature: Store CCACHE cache in CI cache --- .ci/scripts/linux/docker.sh | 2 ++ .gitlab-ci.yml | 27 +++++++++++++++++++ .../service/nvnflinger/hardware_composer.cpp | 1 + 3 files changed, 30 insertions(+) diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh index c6b6590db2..b6b8efeea4 100755 --- a/.ci/scripts/linux/docker.sh +++ b/.ci/scripts/linux/docker.sh @@ -12,6 +12,8 @@ mkdir build || true && cd build cmake .. \ -DBoost_USE_STATIC_LIBS=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DSUYU_USE_PRECOMPILED_HEADERS=OFF \ + -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14121961e0..0a251e87b9 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,22 @@ stages: - format - 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: stage: format @@ -15,11 +31,20 @@ clang-format: # - Linux # - Windows - Parallelized + #LINUX BUILD - BUILDS LINUX APPIMAGE build-linux: stage: build image: suyuemu/cibuild:linux-x64 resource_group: linux-ci + cache: + key: "$CI_COMMIT_REF_NAME-ccache" + paths: + - $CACHE_DIR + before_script: + - mkdir -p $CACHE_DIR + - chmod -R 777 $CACHE_DIR + - ls -la $CACHE_DIR variables: GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_DEPTH: 1 @@ -33,6 +58,7 @@ build-linux: tags: - Linux - Parallelized + #ANDROID BUILD - BUILDS APK android: stage: build @@ -53,3 +79,4 @@ android: tags: - Linux - Parallelized + diff --git a/src/core/hle/service/nvnflinger/hardware_composer.cpp b/src/core/hle/service/nvnflinger/hardware_composer.cpp index f2dfe85a96..bc86a7c44a 100644 --- a/src/core/hle/service/nvnflinger/hardware_composer.cpp +++ b/src/core/hle/service/nvnflinger/hardware_composer.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later +#include #include #include "common/microprofile.h"