forked from appsignal/appsignal-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_matrix.yml
More file actions
276 lines (268 loc) · 7.63 KB
/
build_matrix.yml
File metadata and controls
276 lines (268 loc) · 7.63 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
semaphore: # Default `.semaphore/semaphore.yml` contents
version: v1.0
name: AppSignal Ruby Build and Tests
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
# Cancel all running and queued workflows before this one
auto_cancel:
running:
# Ignore main AND develop branch as we want it to build all workflows
when: "branch != 'main' AND branch != 'develop'"
global_job_config:
env_vars:
- name: RUNNING_IN_CI
value: "true"
- name: _BUNDLER_CACHE
value: "v2"
- name: _GEMS_CACHE
value: "v2"
prologue:
commands:
- checkout
- rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
- |
if [ -n "$_C_VERSION" ]; then
sem-version c $_C_VERSION
else
echo Skipping C-lang install
fi
- |
if [ -n "$RUBY_VERSION" ]; then
sem-version ruby $RUBY_VERSION
./support/check_versions
else
echo Skipping Ruby install
fi
blocks:
- name: Validation
dependencies: []
task:
prologue:
commands:
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
- ./support/bundler_wrapper install --jobs=3 --retry=3
jobs:
- name: Validate CI setup
env_vars:
- name: RUBY_VERSION
value: 2.6.9
- name: GEMSET
value: no_dependencies
- name: BUNDLE_GEMFILE
value: Gemfile
commands:
- ./support/bundler_wrapper exec rake build_matrix:semaphore:validate
epilogue:
on_pass:
commands:
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) $HOME/.gem
- name: Ruby linters
dependencies: []
task:
prologue:
commands:
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
- ./support/bundler_wrapper install --jobs=3 --retry=3
jobs:
- name: RuboCop
env_vars:
- name: RUBY_VERSION
value: 2.6.9
- name: GEMSET
value: no_dependencies
- name: BUNDLE_GEMFILE
value: Gemfile
commands:
- ./support/bundler_wrapper exec rubocop
epilogue:
on_pass:
commands:
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) $HOME/.gem
- name: Other linters
dependencies: []
task:
jobs:
- name: Git Lint (Lintje)
commands:
- script/lint_git
- name: Integration tests
dependencies:
- Validation
task:
prologue:
commands:
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-diagnose-$(checksum Gemfile)
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile)
- ./support/bundler_wrapper install --jobs=3 --retry=3
- ./support/bundler_wrapper exec rake extension:install
- git submodule init
- git submodule update
jobs:
- name: Diagnose
env_vars:
- name: RUBY_VERSION
value: 3.0.2
- name: LANGUAGE
value: ruby
commands:
- spec/integration/diagnose/bin/test
epilogue:
on_pass:
commands:
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-diagnose-$(checksum Gemfile) .bundle
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile) $HOME/.gem
matrix:
env_vars: # Shared for all jobs in the build matrix
- name: BUNDLE_PATH
value: "../.bundle/"
- name: RAILS_ENV
value: "test"
- name: JRUBY_OPTS
value: ""
- name: COV
value: "1"
prologue: # Shared for all jobs in the build matrix
commands:
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE)
- ./support/install_deps
- bundle config set clean 'true'
- ./support/bundler_wrapper install --jobs=3 --retry=3
epilogue: # Shared for all jobs in the build matrix
on_pass:
commands:
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE) $HOME/.gem
on_fail:
commands:
- "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'"
- "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
defaults:
rubygems: "latest"
bundler: "latest"
gemsets: # By default all gems are tested
none:
- "no_dependencies"
old_rails:
- "no_dependencies"
- "rails-3.2"
- "rails-4.2"
minimal:
- "no_dependencies"
- "rails-5.2"
- "rails-6.0"
- "rails-6.1"
- "rails-7.0"
ruby:
- ruby: "2.0.0-p648"
rubygems: "2.7.8"
bundler: "1.17.3"
gems: "old_rails"
- ruby: "2.1.10"
rubygems: "2.7.8"
bundler: "1.17.3"
gems: "none"
- ruby: "2.2.10"
rubygems: "2.7.8"
bundler: "1.17.3"
gems: "none"
- ruby: "2.3.8"
gems: "none"
- ruby: "2.4.10"
gems: "none"
- ruby: "2.5.8"
gems: "minimal"
- ruby: "2.6.9"
- ruby: "2.7.5"
- ruby: "3.0.3"
- ruby: "3.1.0"
- ruby: "jruby-9.2.19.0"
gems: "minimal"
env_vars:
- name: "_C_VERSION"
value: "8"
gems:
- gem: "no_dependencies"
- gem: "capistrano2"
- gem: "capistrano3"
- gem: "grape"
- gem: "padrino"
- gem: "que"
- gem: "que_beta"
- gem: "rails-3.2"
bundler: "1.17.3"
exclude:
ruby:
- "2.6.9"
- "2.7.5"
- "3.0.3"
- "3.1.0"
- gem: "rails-4.2"
bundler: "1.17.3"
exclude:
ruby:
- "2.6.9"
- "2.7.5"
- "3.0.3"
- "3.1.0"
- gem: "rails-5.0"
exclude:
ruby:
- "3.0.3"
- "3.1.0"
- gem: "rails-5.1"
exclude:
ruby:
- "3.0.3"
- "3.1.0"
- gem: "rails-5.2"
exclude:
ruby:
- "3.0.3"
- "3.1.0"
- gem: "rails-6.0"
exclude:
ruby:
- "2.1.10"
- "2.2.10"
- "2.3.8"
- "2.4.10"
- "3.1.0"
- gem: "rails-6.1"
exclude:
ruby:
- "2.1.10"
- "2.2.10"
- "2.3.8"
- "2.4.10"
- gem: "rails-7.0"
exclude:
ruby:
- "2.1.10"
- "2.2.10"
- "2.3.8"
- "2.4.10"
- "2.5.8"
- "2.6.9"
- "jruby-9.2.19.0"
- gem: "resque-1"
bundler: "1.17.3"
exclude:
ruby:
- "3.0.3"
- "3.1.0"
- gem: "resque-2"
- gem: "sequel"
- gem: "sequel-435"
exclude:
ruby:
- "3.0.3"
- "3.1.0"
- gem: "sinatra"
- gem: "webmachine"