From 351327c3d0f52a448098808af8e2b811dc8a8ee7 Mon Sep 17 00:00:00 2001 From: Imbris Date: Tue, 1 Jun 2021 15:33:41 -0400 Subject: [PATCH] Use native macos runner for builds --- .gitlab-ci.yml | 1 + .gitlab/CI/build.gitlab-ci.yml | 35 ++++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ba8620931..e11aa2427b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,7 @@ default: tags: - veloren-docker +# NOTE: overriden for the `.tmacos` template so relevant changes need to be mirrored there before_script: - source $HOME/.cargo/env - df -h / diff --git a/.gitlab/CI/build.gitlab-ci.yml b/.gitlab/CI/build.gitlab-ci.yml index a5f9bc243d..a8ade915d4 100644 --- a/.gitlab/CI/build.gitlab-ci.yml +++ b/.gitlab/CI/build.gitlab-ci.yml @@ -87,13 +87,19 @@ coverage: expire_in: 1 week .tmacos: - image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-macos:${CACHE_IMAGE_TAG} + tags: ["veloren-macos"] + before_script: + - source $HOME/.cargo/env + - cargo --version + - export DISABLE_GIT_LFS_CHECK=true + - export VELOREN_ASSETS="$(pwd)/assets" + - echo "VELOREN_ASSETS=$VELOREN_ASSETS" + - export RUSTFLAGS="-D warnings" script: - - ln -s /dockercache/target target - - rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - - VELOREN_USERDATA_STRATEGY=executable WINIT_LINK_COLORSYNC=true PATH="/osxcross/target/bin:$PATH" COREAUDIO_SDK_PATH=/osxcross/target/SDK/MacOSX10.13.sdk CC=o64-clang CXX=o64-clang++ cargo build --target x86_64-apple-darwin --release - - cp -r target/x86_64-apple-darwin/release/veloren-server-cli $CI_PROJECT_DIR - - cp -r target/x86_64-apple-darwin/release/veloren-voxygen $CI_PROJECT_DIR + - export MACOSX_DEPLOYMENT_TARGET="10.13" + - cargo build --release + - cp -r target/release/veloren-server-cli $CI_PROJECT_DIR + - cp -r target/release/veloren-voxygen $CI_PROJECT_DIR artifacts: paths: - veloren-server-cli @@ -102,6 +108,20 @@ coverage: - LICENSE expire_in: 1 week +# e.g. post merge and scheduled builds +.tmacos-master-cache: + cache: + key: "macos-master-cache" + paths: + - target/ + +# e.g. optional builds from MRs +.tmacos-mr-cache: + cache: + key: "macos-mr-cache" + paths: + - target/ + # build on release or master linux: extends: @@ -117,6 +137,7 @@ macos: extends: - .tmacos - .release + - .tmacos-master-cache # build on schedule quickfix till airshipper 0.5 air-linux: @@ -133,6 +154,7 @@ air-macos: extends: - .tmacos - .release-nightly-tmp-fix-airshipper + - .tmacos-master-cache # if NOT release or master, allow optional builds opt-linux: @@ -149,3 +171,4 @@ opt-macos: extends: - .tmacos - .optional-release + - .tmacos-mr-cache