mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
feature: Store CCACHE cache in CI cache
This commit is contained in:
parent
209c2ac762
commit
a12955236f
2 changed files with 61 additions and 2 deletions
|
@ -11,6 +11,8 @@ 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_FLAGS="-march=x86-64-v2" \
|
||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
||||
|
|
|
@ -1,6 +1,64 @@
|
|||
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
|
||||
image: suyuemu/cibuild:clangformat
|
||||
#THIS HAS TO BE FALSE. IT KEEPS RESOURCES AVAILABLE - EG RUNNERS WONT TRY BUILDING IF CODEBASE IS WRONG
|
||||
#MR's NEED TO BE CORRECTLY CLANG FORMATTED
|
||||
allow_failure: false
|
||||
script:
|
||||
- git submodule update --init --depth 1 --recursive
|
||||
- bash .ci/scripts/format/script.sh
|
||||
tags:
|
||||
# - 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
|
||||
RELEASE_NAME: mainline
|
||||
script:
|
||||
- bash .ci/scripts/linux/docker.sh
|
||||
- bash .ci/scripts/linux/upload.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
tags:
|
||||
- Linux
|
||||
- Parallelized
|
||||
|
||||
#ANDROID BUILD - BUILDS APK
|
||||
android:
|
||||
stage: build
|
||||
|
@ -21,5 +79,4 @@ android:
|
|||
tags:
|
||||
- Linux
|
||||
- Parallelized
|
||||
- Testing
|
||||
- Fijxu
|
||||
|
||||
|
|
Loading…
Reference in a new issue