7
7
push :
8
8
branches :
9
9
- main
10
- - v*.*.x
10
+ - v*.*
11
11
tags :
12
12
- v*.*.*
13
13
pull_request :
14
14
15
15
jobs :
16
+ build-cruby-gem :
17
+ name : " Build CRuby gem"
18
+ runs-on : " ubuntu-latest"
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ - uses : actions/cache@v3
22
+ with :
23
+ path : ports/archives
24
+ key : archives-ubuntu-${{hashFiles('ext/re2/extconf.rb')}}
25
+ - uses : ruby/setup-ruby@v1
26
+ with :
27
+ ruby-version : " 3.2"
28
+ bundler-cache : true
29
+ - run : ./scripts/test-gem-build gems ruby ${{github.ref_type}}
30
+ - uses : actions/upload-artifact@v3
31
+ with :
32
+ name : cruby-gem
33
+ path : gems
34
+
35
+ build-precompiled-gems :
36
+ name : " Precompile ${{ matrix.platform }} gem"
37
+ strategy :
38
+ fail-fast : false
39
+ matrix :
40
+ platform :
41
+ - " aarch64-linux"
42
+ - " arm-linux"
43
+ - " arm64-darwin" # github actions does not support this runtime as of 2022-12, but let's build anyway
44
+ - " x64-mingw-ucrt"
45
+ - " x64-mingw32"
46
+ - " x86-linux"
47
+ - " x86-mingw32" # github actions does not support this runtime as of 2022-12, but let's build anyway
48
+ - " x86_64-darwin"
49
+ - " x86_64-linux"
50
+ runs-on : ubuntu-latest
51
+ steps :
52
+ - uses : actions/checkout@v4
53
+ - uses : actions/cache@v3
54
+ with :
55
+ path : ports/archives
56
+ key : archives-ubuntu-${{hashFiles('ext/re2/extconf.rb')}}
57
+ - run : |
58
+ docker run --rm -v "$(pwd):/re2" -w /re2 \
59
+ "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-${{matrix.platform}}" \
60
+ ./scripts/test-gem-build gems ${{matrix.platform}} ${{github.ref_type}}
61
+ - uses : actions/upload-artifact@v3
62
+ with :
63
+ name : " cruby-${{matrix.platform}}-gem"
64
+ path : gems
65
+
16
66
compile-and-test-system-dependencies :
67
+ name : System libre2.${{ matrix.libre2.soname }} - Ruby ${{ matrix.ruby }}
17
68
needs : ["build-cruby-gem"]
18
- name : System Dependencies - ${{ matrix.sys }} vendored libs - Ruby ${{ matrix.ruby }} - libre2 ABI version ${{ matrix.libre2.soname }}
19
69
runs-on : ubuntu-20.04
20
70
strategy :
21
71
matrix :
22
- sys : ["enable", "disable"]
23
72
ruby :
24
73
- ' 3.2'
25
74
- ' 3.1'
@@ -43,11 +92,13 @@ jobs:
43
92
soname : 10
44
93
- version : " 20230701"
45
94
soname : 11
95
+ needs_abseil : true
46
96
steps :
47
97
- uses : actions/checkout@v4
48
98
- name : Remove any existing libre2 installation
49
99
run : sudo apt-get remove -y libre2-dev libre2-5
50
100
- name : Install Abseil for newer re2 releases
101
+ if : ${{ matrix.libre2.needs_abseil }}
51
102
run : |
52
103
sudo apt-get install -y software-properties-common
53
104
sudo add-apt-repository ppa:savoury1/build-tools
@@ -64,12 +115,11 @@ jobs:
64
115
with :
65
116
name : cruby-gem
66
117
path : gems
67
- - name : " Link libre2 into Ruby's exec_prefix"
68
- run : ln -s /usr/lib/libre2.so `ruby -e "puts RbConfig::CONFIG['exec_prefix']"`/lib/libre2.so
69
- - run : ./scripts/test-gem-install gems --${{matrix.sys}}-system-libraries
118
+ - run : ./scripts/test-gem-install gems --enable-system-libraries
70
119
71
120
compile-and-test-vendored-dependencies :
72
- name : Vendored Dependencies - Ruby ${{ matrix.ruby }} - ${{ matrix.runs-on }}
121
+ name : Vendored - Ruby ${{ matrix.ruby }} - ${{ matrix.runs-on }}
122
+ needs : ["build-cruby-gem"]
73
123
strategy :
74
124
fail-fast : false
75
125
matrix :
@@ -92,136 +142,36 @@ jobs:
92
142
- uses : ruby/setup-ruby@v1
93
143
with :
94
144
ruby-version : ${{matrix.ruby}}
95
- bundler-cache : true
96
- - uses : actions/cache@v3
97
- with :
98
- path : ports
99
- key : ports-${{matrix.runs-on}}-${{hashFiles('ext/re2/extconf.rb')}}
100
- - run : bundle exec rake compile spec
101
-
102
- build-cruby-gem :
103
- runs-on : " ubuntu-latest"
104
- steps :
105
- - uses : actions/checkout@v4
106
- - uses : actions/cache@v3
107
- with :
108
- path : ports/archives
109
- key : archives-ubuntu-${{hashFiles('ext/re2/extconf.rb')}}
110
- - uses : ruby/setup-ruby@v1
111
- with :
112
- ruby-version : " 3.2"
113
- bundler-cache : true
114
- - run : ./scripts/test-gem-build gems ruby ${{github.ref_type}}
115
- - uses : actions/upload-artifact@v3
116
- with :
117
- name : cruby-gem
118
- path : gems
119
-
120
- test-cruby-gem-linux :
121
- needs : ["build-cruby-gem"]
122
- strategy :
123
- fail-fast : false
124
- matrix :
125
- ruby : ["2.6", "2.7", "3.0", "3.1", "3.2"]
126
- runs-on : ubuntu-latest
127
- steps :
128
- - uses : actions/checkout@v4
129
- - uses : ruby/setup-ruby@v1
130
- with :
131
- ruby-version : " ${{matrix.ruby}}"
132
- - uses : actions/download-artifact@v3
133
- with :
134
- name : cruby-gem
135
- path : gems
136
- - run : ./scripts/test-gem-install gems
137
-
138
- test-cruby-gem-macos :
139
- needs : ["build-cruby-gem"]
140
- strategy :
141
- fail-fast : false
142
- matrix :
143
- ruby : ["2.6", "2.7", "3.0", "3.1", "3.2"]
144
- runs-on : macos-latest
145
- steps :
146
- - uses : actions/checkout@v4
147
- - uses : ruby/setup-ruby@v1
148
- with :
149
- ruby-version : " ${{matrix.ruby}}"
150
- - uses : actions/download-artifact@v3
151
- with :
152
- name : cruby-gem
153
- path : gems
154
- - run : ./scripts/test-gem-install gems
155
-
156
- test-cruby-gem-windows :
157
- needs : ["build-cruby-gem"]
158
- strategy :
159
- fail-fast : false
160
- matrix :
161
- ruby : ["2.6", "2.7", "3.0"]
162
- runs-on : windows-latest
163
- steps :
164
- - uses : actions/checkout@v4
165
- - uses : ruby/setup-ruby@v1
166
- with :
167
- ruby-version : " ${{matrix.ruby}}"
168
145
- uses : actions/download-artifact@v3
169
146
with :
170
147
name : cruby-gem
171
148
path : gems
172
149
- run : ./scripts/test-gem-install gems
173
150
shell : bash
174
151
175
- test-cruby-gem-windows-ucrt :
152
+ compile-and-test-vendored-dependencies-with-system-install :
153
+ name : Vendored - system libre2-dev - Ruby 3.2
176
154
needs : ["build-cruby-gem"]
177
- strategy :
178
- fail-fast : false
179
- matrix :
180
- ruby : ["3.1", "3.2"]
181
- runs-on : windows-2022
155
+ runs-on : ubuntu-latest
182
156
steps :
183
157
- uses : actions/checkout@v4
158
+ - name : Install RE2
159
+ run : sudo apt-get install -y libre2-dev
184
160
- uses : ruby/setup-ruby@v1
161
+ id : setup-ruby
185
162
with :
186
- ruby-version : " ${{matrix.ruby}}"
163
+ ruby-version : " 3.2"
164
+ bundler-cache : true
187
165
- uses : actions/download-artifact@v3
188
166
with :
189
167
name : cruby-gem
190
168
path : gems
169
+ - name : " Link libre2 into Ruby's lib directory"
170
+ run : ln -s /usr/lib/x86_64-linux-gnu/libre2.so ${{ steps.setup-ruby.outputs.ruby-prefix }}/lib/libre2.so
191
171
- run : ./scripts/test-gem-install gems
192
- shell : bash
193
-
194
- build-precompiled-gems :
195
- strategy :
196
- fail-fast : false
197
- matrix :
198
- platform :
199
- - " aarch64-linux"
200
- - " arm-linux"
201
- - " arm64-darwin" # github actions does not support this runtime as of 2022-12, but let's build anyway
202
- - " x64-mingw-ucrt"
203
- - " x64-mingw32"
204
- - " x86-linux"
205
- - " x86-mingw32" # github actions does not support this runtime as of 2022-12, but let's build anyway
206
- - " x86_64-darwin"
207
- - " x86_64-linux"
208
- runs-on : ubuntu-latest
209
- steps :
210
- - uses : actions/checkout@v4
211
- - uses : actions/cache@v3
212
- with :
213
- path : ports/archives
214
- key : archives-ubuntu-${{hashFiles('ext/re2/extconf.rb')}}
215
- - run : |
216
- docker run --rm -v "$(pwd):/re2" -w /re2 \
217
- "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-${{matrix.platform}}" \
218
- ./scripts/test-gem-build gems ${{matrix.platform}} ${{github.ref_type}}
219
- - uses : actions/upload-artifact@v3
220
- with :
221
- name : " cruby-${{matrix.platform}}-gem"
222
- path : gems
223
172
224
173
test-precompiled-aarch64-linux :
174
+ name : Precompiled - Ruby ${{ matrix.ruby }} - aarch64-linux
225
175
needs : ["build-precompiled-gems"]
226
176
strategy :
227
177
fail-fast : false
@@ -243,6 +193,7 @@ jobs:
243
193
./scripts/test-gem-install ./gems
244
194
245
195
test-precompiled-arm-linux :
196
+ name : Precompiled - Ruby ${{ matrix.ruby }} - arm-linux
246
197
needs : ["build-precompiled-gems"]
247
198
strategy :
248
199
fail-fast : false
@@ -264,6 +215,7 @@ jobs:
264
215
./scripts/test-gem-install ./gems
265
216
266
217
test-precompiled-x64-mingw-ucrt :
218
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x64-mingw-ucrt
267
219
needs : ["build-precompiled-gems"]
268
220
strategy :
269
221
fail-fast : false
@@ -283,6 +235,7 @@ jobs:
283
235
shell : bash
284
236
285
237
test-precompiled-x64-mingw32 :
238
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x64-mingw32
286
239
needs : ["build-precompiled-gems"]
287
240
strategy :
288
241
fail-fast : false
@@ -302,6 +255,7 @@ jobs:
302
255
shell : bash
303
256
304
257
test-precompiled-x86-linux :
258
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x86-linux
305
259
needs : ["build-precompiled-gems"]
306
260
strategy :
307
261
fail-fast : false
@@ -322,7 +276,8 @@ jobs:
322
276
ruby:${{matrix.ruby}} \
323
277
./scripts/test-gem-install ./gems
324
278
325
- test-precompiled-linux-x86_64 :
279
+ test-precompiled-x86_64-linux :
280
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x86_64-linux
326
281
needs : ["build-precompiled-gems"]
327
282
strategy :
328
283
fail-fast : false
@@ -341,6 +296,7 @@ jobs:
341
296
- run : ./scripts/test-gem-install gems
342
297
343
298
test-precompiled-x86_64-darwin :
299
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x86_64-darwin
344
300
needs : ["build-precompiled-gems"]
345
301
strategy :
346
302
fail-fast : false
@@ -358,7 +314,8 @@ jobs:
358
314
path : gems
359
315
- run : ./scripts/test-gem-install gems
360
316
361
- test-precompiled-x86_64-linux :
317
+ test-precompiled-x86_64-alpine :
318
+ name : Precompiled - Ruby ${{ matrix.ruby }} - x86_64-alpine
362
319
needs : ["build-precompiled-gems"]
363
320
strategy :
364
321
fail-fast : false
0 commit comments