diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30654a8471..f275702d2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -508,9 +508,13 @@ Ubuntu_GCC_integration_tests_asan: - ccache/ script: - CI/before_install.macos.sh + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$(pwd)/ccache" + - mkdir -pv "${CCACHE_DIR}" - CI/macos/ccache_prep.sh - CI/before_script.macos.sh - CI/macos/build.sh + - cd build - for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${DMG_IDENTIFIER}_${CI_COMMIT_REF_NAME##*/}.dmg"; done - | if [[ -n "${AWS_ACCESS_KEY_ID}" ]]; then @@ -526,7 +530,7 @@ Ubuntu_GCC_integration_tests_asan: s3cmd put "${dmg}" s3://openmw-artifacts/${artifactDirectory} done fi - - ccache -s + - CI/macos/ccache_save.sh artifacts: paths: - build/OpenMW-*.dmg @@ -537,7 +541,7 @@ macOS14_Xcode15_amd64: tags: - saas-macos-medium-m1 cache: - key: macOS14_Xcode15_amd64.v1 + key: macOS14_Xcode15_amd64.v2 variables: CCACHE_SIZE: 3G DMG_IDENTIFIER: amd64 diff --git a/CI/macos/ccache_prep.sh b/CI/macos/ccache_prep.sh index 06dd5c8479..abd0103be0 100755 --- a/CI/macos/ccache_prep.sh +++ b/CI/macos/ccache_prep.sh @@ -1,7 +1,7 @@ #!/bin/sh -ex -export CCACHE_BASEDIR="$(pwd)" -export CCACHE_DIR="$(pwd)/ccache" -mkdir -pv "${CCACHE_DIR}" - -ccache -z -M "${CCACHE_SIZE}" +if [[ "${MACOS_AMD64}" ]]; then + arch -x86_64 ccache -z -M "${CCACHE_SIZE}" +else + ccache -z -M "${CCACHE_SIZE}" +fi diff --git a/CI/macos/ccache_save.sh b/CI/macos/ccache_save.sh new file mode 100755 index 0000000000..d06d16fb0c --- /dev/null +++ b/CI/macos/ccache_save.sh @@ -0,0 +1,7 @@ +#!/bin/sh -ex + +if [[ "${MACOS_AMD64}" ]]; then + arch -x86_64 ccache -s +else + ccache -s +fi