forked from ShuriZma/suyu
1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Fijxu 44a2e172ed
fix: Use chmod inside the CCACHE directory
If we need to replace the docker image for any reason, the user will
(probably) be different. This ensures that the CCACHE directory can be
read and writen by any user of the docker image being used in the CI.
2024-03-14 20:32:16 -03:00
Fijxu 90ab1c3882
fix: Re add CMAKE_CXX_COMPILER and CMAKE_C_COMPILER. Now pointing to
GCC12.
2024-03-14 20:08:51 -03:00
Fijxu aa20f384dc
feature: Store CCACHE cache in CI Cache. 2024-03-14 19:45:27 -03:00
3 changed files with 37 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
@ -6,15 +7,18 @@
# Exit on error, rather than continuing with the rest of the script.
set -e
# Old versions of ccache don't include the -v argument. Keep it only with -s
ccache -s
mkdir build || true && cd build
cmake .. \
-DBoost_USE_STATIC_LIBS=ON \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
-DCMAKE_C_COMPILER=/usr/local/bin/gcc \
-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" \
-DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
@ -24,6 +28,7 @@ cmake .. \
-DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_ENABLE_LTO=ON \
-DSUYU_CRASH_DUMPS=ON \
-DUSE_CCACHE=ON \
-GNinja
ninja

4
.gitignore vendored
View File

@ -39,3 +39,7 @@ Thumbs.db
# Local Gitlab CI Runner
.gitlab-ci-local/
# clangd compile_commands.json
# https://clangd.llvm.org/installation.html#project-setup
compile_commands.json

View File

@ -1,6 +1,21 @@
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
@ -10,11 +25,20 @@ clang-format:
script:
- git submodule update --init --depth 1 --recursive
- bash .ci/scripts/format/script.sh
#LINUX BUILD - BUILDS LINUX APPIMAGE
build-linux:
stage: build
image: registry.gitlab.com/ddutchie/ci-docker: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
@ -25,6 +49,7 @@ build-linux:
artifacts:
paths:
- artifacts/*
#ANDROID BUILD - BUILDS APK
android:
stage: build
@ -39,3 +64,4 @@ android:
artifacts:
paths:
- artifacts/*