suyu-mirror/.gitlab-ci.yml

84 lines
2.0 KiB
YAML

2024-03-07 10:36:40 +07:00
stages:
2024-03-08 13:19:32 +07:00
- format
2024-03-08 13:26:40 +07:00
- 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 (boolean)
# https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
FF_USE_FASTZIP: 1
# Our Variables
CACHE_DIR: "$CI_PROJECT_DIR/ccache"
CCACHE_DIR: $CACHE_DIR
#CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
2024-03-08 13:26:40 +07:00
clang-format:
stage: format
image: suyuemu/cibuild:clangformat
2024-03-15 09:48:12 +07:00
#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
2024-03-08 13:26:40 +07:00
script:
2024-03-08 16:44:03 +07:00
- git submodule update --init --depth 1 --recursive
2024-03-08 13:26:40 +07:00
- bash .ci/scripts/format/script.sh
2024-03-15 14:55:53 +07:00
tags:
# - Linux
# - Windows
2024-03-15 14:55:53 +07:00
- Parallelized
2024-03-18 04:16:46 +07:00
- Format
#LINUX BUILD - BUILDS LINUX APPIMAGE
2024-03-07 10:36:40 +07:00
build-linux:
stage: build
image: suyuemu/cibuild:linux-x64
2024-03-07 10:36:40 +07:00
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
2024-03-07 10:36:40 +07:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_DEPTH: 1
RELEASE_NAME: mainline
script:
2024-03-07 10:36:40 +07:00
- bash .ci/scripts/linux/docker.sh
- bash .ci/scripts/linux/upload.sh
artifacts:
paths:
- artifacts/*
2024-03-15 14:55:53 +07:00
tags:
- Linux
- Parallelized
#ANDROID BUILD - BUILDS APK
android:
stage: build
image: suyuemu/cibuild:android-x64
script:
- apt-get update -y
- git submodule update --init --recursive
- cd externals/vcpkg
- git fetch --unshallow || true
- cd ../..
- export ANDROID_HOME="/usr/lib/android-sdk/"
- echo y | sdkmanager --sdk_root=/usr/lib/android-sdk --licenses
- bash ./.ci/scripts/android/build.sh
- bash ./.ci/scripts/android/upload.sh
artifacts:
paths:
- artifacts/*
2024-03-15 14:55:53 +07:00
tags:
2024-03-19 15:25:13 +07:00
- Android
2024-03-15 14:55:53 +07:00
- Parallelized