-
Notifications
You must be signed in to change notification settings - Fork 33
/
.gitlab-ci.yml
50 lines (44 loc) · 1.23 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
stages:
- check
- build
- build2
- publish
- deploy
variables:
GIT_CLEAN_FLAGS: -f
CACHE_IMAGE_TAG: 5e1a5f9f
TAG_REGEX: '/^v[0-9]+\.[0-9]+\.[0-9]+$/'
default:
# 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
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 /
- free -h
- cargo --version
- export DISABLE_GIT_LFS_CHECK=true
- export RUSTFLAGS="-D warnings"
workflow:
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# For release builds that should only run when a commit on master is tagged
.treleasetag:
rules:
- if: $CI_PIPELINE_SOURCE != "merge_request_event" && ( $CI_COMMIT_TAG != null && $CI_COMMIT_TAG =~ $TAG_REGEX )
when: on_success
- when: never
include:
- local: .gitlab/CI/check.gitlab-ci.yml
- local: .gitlab/CI/build.gitlab-ci.yml
- local: .gitlab/CI/publish.gitlab-ci.yml