veloren/.gitlab-ci.yml
2020-05-24 12:26:15 +02:00

50 lines
1.6 KiB
YAML

stages:
- optional-builds
- check-compile
- build-post
- publish
variables:
# Note: this is deprecated!
# https://docs.gitlab.com/ee/ci/yaml/#git-strategy
# However in gitlab web ui it's set to fetch so it should be fine ¯\_(ツ)_/¯
GIT_STRATEGY: fetch
# Note: this is deprecated!
# ttps://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
GIT_DEPTH: 3
GIT_CLEAN_FLAGS: -f
default:
image: registry.gitlab.com/veloren/veloren-docker-ci:latest
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines
interruptible: true
# Retry automatically incase the runner times out or there's a runner failure
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
before_script:
- source $HOME/.cargo/env
- df -h /
- free -h
- cargo --version
- export DISABLE_GIT_LFS_CHECK=true
- export VELOREN_ASSETS="$(pwd)/assets"
- echo "VELOREN_ASSETS=$VELOREN_ASSETS"
- rm -r target || echo "target doesnt exist, which is fine"
- ln -s /dockercache/veloren/target target
include:
# pipelines run for branches and tags.
# https://docs.gitlab.com/ee/ci/yaml/#workflowrules
# TODO: https://docs.gitlab.com/ee/ci/merge_request_pipelines/pipelines_for_merged_results/index.html#enable-pipelines-for-merged-results
- template: "Workflows/Branch-Pipelines.gitlab-ci.yml"
- local: .gitlab/CI/recompile.yml
- local: .gitlab/CI/release.yml
- local: .gitlab/CI/optional-builds.gitlab-ci.yml
- local: .gitlab/CI/check-compile.gitlab-ci.yml
- local: .gitlab/CI/build-post.gitlab-ci.yml
- local: .gitlab/CI/publish.gitlab-ci.yml