-
Notifications
You must be signed in to change notification settings - Fork 7
/
.cirrus.yml
41 lines (39 loc) · 1.56 KB
/
.cirrus.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
timeout_in: 30m
env:
YP_CI_BREW_INSTALL: minimal
YP_LOG_BOOTSTRAP: "true"
YP_PRINTENV_BOOTSTRAP: "false"
YP_TRANSCRYPT_PASSWORD: ""
V: ""
task:
name: "continuous-integration/cirrus" # otherwise 'main' shows in Github UI
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ 'cirrus.*' || $CIRRUS_BRANCH =~ 'pull/.*'
container:
# 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 cirrus jobs through it failed
image: homebrew/ubuntu20.04
# see https://cirrus-ci.org/guide/tips-and-tricks/#custom-clone-command
clone_script: |
GIT_CLONE_BRANCH=$CIRRUS_BRANCH
[[ -z "$CIRRUS_PR" ]] || GIT_CLONE_BRANCH=$CIRRUS_DEFAULT_BRANCH
git clone --recursive --branch=$GIT_CLONE_BRANCH \
https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git \
$CIRRUS_WORKING_DIR
[[ -z "$CIRRUS_PR" ]] || {
git fetch origin refs/pull/$CIRRUS_PR/head:$CIRRUS_BRANCH
git checkout $CIRRUS_BRANCH
}
unset GIT_CLONE_BRANCH
git reset --hard $CIRRUS_CHANGE_IN_REPO
clone_submodule_script: |
git submodule sync --recursive
git submodule update --init --recursive
before_install_script: ./.ci.sh before_install
install_script: ./.ci.sh install
before_script_script: ./.ci.sh before_script
script_script: ./.ci.sh script
after_success_script: ./.ci.sh after_success
# after_failure_script: ./.ci.sh after_failure
# after_script_script: ./.ci.sh after_script