Use native macos runner for builds

This commit is contained in:
Imbris 2021-06-01 15:33:41 -04:00
parent 2c279c02d1
commit 351327c3d0
2 changed files with 30 additions and 6 deletions

View File

@ -27,6 +27,7 @@ default:
tags: tags:
- veloren-docker - veloren-docker
# NOTE: overriden for the `.tmacos` template so relevant changes need to be mirrored there
before_script: before_script:
- source $HOME/.cargo/env - source $HOME/.cargo/env
- df -h / - df -h /

View File

@ -87,13 +87,19 @@ coverage:
expire_in: 1 week expire_in: 1 week
.tmacos: .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: script:
- ln -s /dockercache/target target - export MACOSX_DEPLOYMENT_TARGET="10.13"
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - cargo build --release
- 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/release/veloren-server-cli $CI_PROJECT_DIR
- cp -r target/x86_64-apple-darwin/release/veloren-server-cli $CI_PROJECT_DIR - cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
- cp -r target/x86_64-apple-darwin/release/veloren-voxygen $CI_PROJECT_DIR
artifacts: artifacts:
paths: paths:
- veloren-server-cli - veloren-server-cli
@ -102,6 +108,20 @@ coverage:
- LICENSE - LICENSE
expire_in: 1 week 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 # build on release or master
linux: linux:
extends: extends:
@ -117,6 +137,7 @@ macos:
extends: extends:
- .tmacos - .tmacos
- .release - .release
- .tmacos-master-cache
# build on schedule quickfix till airshipper 0.5 # build on schedule quickfix till airshipper 0.5
air-linux: air-linux:
@ -133,6 +154,7 @@ air-macos:
extends: extends:
- .tmacos - .tmacos
- .release-nightly-tmp-fix-airshipper - .release-nightly-tmp-fix-airshipper
- .tmacos-master-cache
# if NOT release or master, allow optional builds # if NOT release or master, allow optional builds
opt-linux: opt-linux:
@ -149,3 +171,4 @@ opt-macos:
extends: extends:
- .tmacos - .tmacos
- .optional-release - .optional-release
- .tmacos-mr-cache