From 539b46aaf0e3dfb34b86ff7933d40d0035b12dea Mon Sep 17 00:00:00 2001 From: elsid Date: Mon, 12 Apr 2021 16:01:09 +0200 Subject: [PATCH 1/2] Use different cache keys for different macOS builds --- .gitlab-ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 715a88874..f8cd18106 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -115,7 +115,7 @@ Debian_Clang_tests: CCACHE_SIZE: 1G BUILD_TESTS_ONLY: 1 -MacOS: +.MacOS: image: macos-11-xcode-12 tags: - macos @@ -123,8 +123,14 @@ MacOS: only: variables: - $CI_PROJECT_ID == "7107382" + cache: + paths: + - ccache/ script: - rm -fr build/* # remove anything in the build directory + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$(pwd)/ccache" + - mkdir -pv "${CCACHE_DIR}" - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j $(sysctl -n hw.logicalcpu) package @@ -134,9 +140,17 @@ MacOS: - build/OpenMW-*.dmg - "build/**/*.log" +macOS11_Xcode12: + extends: .MacOS + image: macos-11-xcode-12 + cache: + key: macOS11_Xcode12.v1 + macOS10.15_Xcode11: - extends: MacOS + extends: .MacOS image: macos-10.15-xcode-11 + cache: + key: macOS10.15_Xcode11.v1 variables: &engine-targets targets: "openmw,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard" From 663ad5e19207c83ee75dc151a80a83ed5695fcbe Mon Sep 17 00:00:00 2001 From: elsid Date: Mon, 12 Apr 2021 16:02:57 +0200 Subject: [PATCH 2/2] Print ccache stats for macOS builds --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8cd18106..10d443dd1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -131,10 +131,12 @@ Debian_Clang_tests: - export CCACHE_BASEDIR="$(pwd)" - export CCACHE_DIR="$(pwd)/ccache" - mkdir -pv "${CCACHE_DIR}" + - ccache -z -M "${CCACHE_SIZE}" - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j $(sysctl -n hw.logicalcpu) package - for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.dmg"; done + - ccache -s artifacts: paths: - build/OpenMW-*.dmg @@ -145,12 +147,16 @@ macOS11_Xcode12: image: macos-11-xcode-12 cache: key: macOS11_Xcode12.v1 + variables: + CCACHE_SIZE: 3G macOS10.15_Xcode11: extends: .MacOS image: macos-10.15-xcode-11 cache: key: macOS10.15_Xcode11.v1 + variables: + CCACHE_SIZE: 3G variables: &engine-targets targets: "openmw,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard"