-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
44 lines (41 loc) · 1.07 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
variables:
FORCE_UNSAFE_CONFIGURE: "1"
GIT_SUBMODULE_STRATEGY: recursive
YP_CI_BREW_INSTALL: minimal
YP_LOG_BOOTSTRAP: "true"
.aliases:
- &shared
image:
# name: ubuntu:20.04
# NOTE using the prebuilt docker image of homebrew (linuxbrew)
# because homebrew cannot be installed as root,
# and creating a sudoer user and then running gitlab jobs through it failed
name: homebrew/ubuntu20.04:3.2.8
only:
- /^gitlab/ # gitlab branches
# - master
# - /^v(\d+)\.(\d+)\.(\d+)/ # version tags
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
# common
- $HOME/.local
- $HOME/.npm
# macos
- $HOME/.homebrew
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
# linux
- $HOME/.cache/Homebrew
- $HOME/.cache/pip
- $HOME/.linuxbrew
main_job:
<<: *shared
script:
- |
set -x
sudo chown -R $(id -u):$(id -g) ${CI_PROJECT_DIR}
- |
set -euo pipefail
cd ${CI_PROJECT_DIR}
source ci/pipeline.script.sh