This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
192 lines (171 loc) · 4.71 KB
/
config.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
version: 2.1
orbs:
jq: circleci/[email protected]
aliases:
- &step_restore_cache
restore_cache:
keys:
- v1-{{ .Branch }}-<< parameters.p_cache_name >>-{{ checksum "~/week-number" }}
- v1-master-<< parameters.p_cache_name >>-{{ checksum "~/week-number" }}
- &step_save_cache
save_cache:
key: v1-{{ .Branch }}-<< parameters.p_cache_name >>-{{ checksum "~/week-number" }}
paths:
# common
- ~/.local
- ~/.npm
# darwin
- ~/.homebrew
- ~/Library/Caches/Homebrew
- ~/Library/Caches/pip
# linux
- ~/.cache/Homebrew
- ~/.cache/pip
- ~/.linuxbrew
- job-main-linux-bionic-minimal: &job-main-linux-bionic-minimal
p_ci_is_cron: "false"
p_executor:
name: docker
p_image: circleci/buildpack-deps:bionic
p_cache_name: linux-bionic-minimal
p_install: minimal
- job-main-linux-bionic-dev: &job-main-linux-bionic-dev
p_ci_is_cron: "false"
p_executor:
name: docker
p_image: circleci/buildpack-deps:bionic
p_cache_name: linux-bionic-dev
p_install: dev
- job-main-macos-xcode101-dev: &job-main-macos-xcode101-dev
p_ci_is_cron: "false"
p_executor:
name: macos
p_xcode: "10.1.0"
p_cache_name: macos-xcode10.1-dev
p_install: dev
- filter-main: &filter-main
filters:
branches:
only: master
tags:
only: /^v(\d+)\.(\d+)\.(\d+)/ # version tags
executors:
docker:
parameters:
p_image:
type: string
docker:
- image: << parameters.p_image >>
macos:
parameters:
p_xcode:
type: string
macos:
xcode: << parameters.p_xcode >>
commands:
job-main-steps:
parameters:
p_ci_is_cron:
type: string
p_executor:
type: executor
p_cache_name:
type: string
p_install:
type: string
steps:
- run: echo "CI_IS_CRON=<< parameters.p_ci_is_cron >>" >> $BASH_ENV
- run: echo "SF_CI_BREW_INSTALL=<< parameters.p_install >>" >> $BASH_ENV
- run: echo "SF_LOG_BOOTSTRAP=true" >> $BASH_ENV
- run: date +%v > ~/week-number
- checkout
- jq/install
- run: git submodule sync
- run: git submodule update --init --recursive
- *step_restore_cache
- run: ./.ci.sh before_install
- run: ./.ci.sh install
- run: ./.ci.sh before_script
- run: ./.ci.sh script
- run:
when: on_fail
command: ./.ci.sh after_failure
- run:
when: on_success
command: ./.ci.sh after_success
- run:
when: always
command: ./.ci.sh after_script
- run: ./.ci.sh before_cache
- *step_save_cache
# - setup_remote_docker
# - run: |
# if [[ -n "${CIRCLE_TAG:-}" ]]; then
# ./.ci.sh before_deploy;
# ./.ci.sh deploy;
# ./.ci.sh after_deploy;
# fi
jobs:
main:
parameters: &job-main-parameters
p_ci_is_cron:
type: string
p_executor:
type: executor
p_cache_name:
type: string
p_install:
type: string
executor: &job-main-executor << parameters.p_executor >>
steps:
- &job-main-steps
job-main-steps:
p_ci_is_cron: << parameters.p_ci_is_cron >>
p_executor: << parameters.p_executor >>
p_cache_name: << parameters.p_cache_name >>
p_install: << parameters.p_install >>
main-linux-bionic-minimal:
parameters: *job-main-parameters
executor: *job-main-executor
steps:
- *job-main-steps
main-linux-bionic-dev:
parameters: *job-main-parameters
executor: *job-main-executor
steps:
- *job-main-steps
main-macos-xcode101-dev:
parameters: *job-main-parameters
executor: *job-main-executor
steps:
- *job-main-steps
workflows:
version: 2.1
main:
jobs:
- main-linux-bionic-minimal:
<<: *filter-main
<<: *job-main-linux-bionic-minimal
- main-linux-bionic-dev:
<<: *filter-main
<<: *job-main-linux-bionic-dev
# - main-macos-xcode101-dev:
# <<: *filter-main
# <<: *job-main-macos-xcode101-dev
# nightly:
# triggers:
# - schedule:
# filters:
# branches:
# only: master
# cron: "0 0 * * *"
# jobs:
# - main-linux-bionic-minimal:
# <<: *job-main-linux-bionic-minimal
# p_ci_is_cron: "true"
# - main-linux-bionic-dev:
# <<: *job-main-linux-bionic-dev
# p_ci_is_cron: "true"
# # - main-macos-xcode101-dev:
# # <<: *job-main-macos-xcode101-dev
# # p_ci_is_cron: "true"