32
32
- run : bundle exec rake rubocop
33
33
34
34
basic :
35
- needs : [" rubocop"]
35
+ needs : rubocop
36
36
runs-on : ubuntu-latest
37
37
steps :
38
38
- uses : actions/checkout@v4
44
44
- run : bundle exec rake compile test -- --enable-system-libraries
45
45
46
46
test :
47
- needs : [" basic"]
47
+ needs : basic
48
48
strategy :
49
49
fail-fast : false
50
50
matrix :
85
85
fedora :
86
86
# reported at https://github.com/sparklemotion/sqlite3-ruby/issues/354
87
87
# TODO remove once https://github.com/flavorjones/mini_portile/issues/118 is fixed
88
- needs : [" basic"]
88
+ needs : basic
89
89
name : " fedora:35"
90
90
runs-on : ubuntu-latest
91
91
container :
@@ -100,7 +100,7 @@ jobs:
100
100
- run : bundle exec rake test
101
101
102
102
sqlcipher :
103
- needs : [" basic"]
103
+ needs : basic
104
104
strategy :
105
105
fail-fast : false
106
106
matrix :
@@ -129,7 +129,7 @@ jobs:
129
129
- run : bundle exec rake test
130
130
131
131
valgrind :
132
- needs : [" basic"]
132
+ needs : basic
133
133
runs-on : ubuntu-latest
134
134
steps :
135
135
- uses : actions/checkout@v4
@@ -149,17 +149,17 @@ jobs:
149
149
# gem tests (source and native)
150
150
#
151
151
native_setup :
152
- needs : [" basic"]
152
+ needs : basic
153
153
name : " Setup for native gem tests"
154
154
runs-on : ubuntu-latest
155
155
outputs :
156
- rcd_image_version : ${{steps.rcd_image_version.outputs.rcd_image_version}}
156
+ rcd_image_version : ${{ steps.rcd_image_version.outputs.rcd_image_version }}
157
157
steps :
158
158
- uses : actions/checkout@v4
159
159
- uses : actions/cache@v4
160
160
with :
161
161
path : ports/archives
162
- key : ports-archives-tarball-${{hashFiles('ext/sqlite3/extconf.rb','dependencies.yml')}}
162
+ key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
163
163
- uses : ruby/setup-ruby@v1
164
164
with :
165
165
ruby-version : " 3.3"
@@ -168,114 +168,54 @@ jobs:
168
168
- id : rcd_image_version
169
169
run : bundle exec ruby -e 'require "rake_compiler_dock"; puts "rcd_image_version=#{RakeCompilerDock::IMAGE_VERSION}"' >> $GITHUB_OUTPUT
170
170
171
- cruby-package :
172
- needs : ["native_setup"]
171
+ build_source_gem :
172
+ needs : native_setup
173
+ name : " build source"
173
174
runs-on : ubuntu-latest
174
175
steps :
175
176
- uses : actions/checkout@v4
176
177
- uses : actions/cache@v4
177
178
with :
178
179
path : ports/archives
179
- key : ports-archives-tarball-${{hashFiles('ext/sqlite3/extconf.rb','dependencies.yml')}}
180
+ key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
180
181
- uses : ruby/setup-ruby@v1
181
182
with :
182
183
ruby-version : " 3.3"
183
184
bundler-cache : true
184
185
- run : ./bin/test-gem-build gems ruby
185
186
- uses : actions/upload-artifact@v3
186
187
with :
187
- name : cruby -gem
188
+ name : source -gem
188
189
path : gems
189
190
retention-days : 1
190
191
191
- cruby-linux-install :
192
- needs : ["cruby-package"]
192
+ install_source_linux :
193
+ needs : build_source_gem
194
+ name : " test source"
193
195
strategy :
194
196
fail-fast : false
195
197
matrix :
196
- sys : ["enable", "disable"]
197
- ruby : ["3.0", "3.1", "3.2", "3.3"]
198
- runs-on : ubuntu-latest
199
- steps :
200
- - uses : actions/checkout@v4
201
- - uses : ruby/setup-ruby-pkgs@v1
202
- with :
203
- ruby-version : " ${{matrix.ruby}}"
204
- apt-get : " libsqlite3-dev pkg-config"
205
- - uses : actions/download-artifact@v3
206
- with :
207
- name : cruby-gem
208
- path : gems
209
- - run : ./bin/test-gem-install gems --${{matrix.sys}}-system-libraries
210
-
211
- cruby-osx-install :
212
- needs : ["cruby-package"]
213
- strategy :
214
- fail-fast : false
215
- matrix :
216
- sys : ["enable", "disable"]
217
- ruby : ["3.1", "3.2", "3.3", "truffleruby"]
218
- runs-on : macos-latest
198
+ os : [ubuntu, macos, windows]
199
+ ruby : ["3.3", "3.2", "3.1", "3.0"]
200
+ syslib : [enable, disable]
201
+ include :
202
+ # additional compilation flags for homebrew
203
+ - { os: macos, syslib: enable, compile_flags: "--with-opt-dir=$(brew --prefix sqlite3)" }
204
+ runs-on : ${{ matrix.os }}-latest
219
205
steps :
220
206
- uses : actions/checkout@v4
221
207
- uses : ruby/setup-ruby-pkgs@v1
222
208
with :
223
- ruby-version : " ${{matrix.ruby}}"
209
+ ruby-version : ${{ matrix.ruby }}
210
+ apt-get : libsqlite3-dev pkg-config
224
211
brew : sqlite3 pkg-config
212
+ mingw : sqlite3
225
213
- uses : actions/download-artifact@v3
226
214
with :
227
- name : cruby-gem
228
- path : gems
229
- - if : matrix.sys == 'enable'
230
- run : ./bin/test-gem-install gems --enable-system-libraries --with-opt-dir=$(brew --prefix sqlite3)
231
- - if : matrix.sys == 'disable'
232
- run : ./bin/test-gem-install gems --disable-system-libraries
233
-
234
- cruby-windows-install :
235
- needs : ["cruby-package"]
236
- strategy :
237
- fail-fast : false
238
- matrix :
239
- sys : ["enable", "disable"]
240
- ruby : ["3.0"]
241
- runs-on : windows-latest
242
- steps :
243
- - uses : actions/checkout@v4
244
- - uses : ruby/setup-ruby-pkgs@v1
245
- with :
246
- ruby-version : " ${{matrix.ruby}}"
247
- mingw : " sqlite3"
248
- - uses : actions/download-artifact@v3
249
- with :
250
- name : cruby-gem
251
- path : gems
252
- - run : |
253
- gem install --verbose --no-document gems/*.gem -- --${{matrix.sys}}-system-libraries
254
- gem list -d sqlite3
255
- ruby -rsqlite3 -e 'puts SQLite3::SQLITE_LOADED_VERSION'
256
-
257
- cruby-windows-install-ucrt :
258
- needs : ["cruby-package"]
259
- strategy :
260
- fail-fast : false
261
- matrix :
262
- sys : ["enable", "disable"]
263
- ruby : ["3.1", "3.2", "3.3"]
264
- runs-on : windows-2022
265
- steps :
266
- - uses : actions/checkout@v4
267
- - uses : ruby/setup-ruby-pkgs@v1
268
- with :
269
- ruby-version : " ${{matrix.ruby}}"
270
- mingw : " sqlite3"
271
- - uses : actions/download-artifact@v3
272
- with :
273
- name : cruby-gem
215
+ name : source-gem
274
216
path : gems
275
- - run : |
276
- gem install --verbose --no-document gems/*.gem -- --${{matrix.sys}}-system-libraries
277
- gem list -d sqlite3
278
- ruby -rsqlite3 -e 'puts SQLite3::SQLITE_LOADED_VERSION'
217
+ - run : ./bin/test-gem-install gems -- --${{ matrix.syslib }}-system-libraries ${{ matrix.compile_flags }}
218
+ shell : bash
279
219
280
220
cruby-native-package :
281
221
needs : ["native_setup"]
0 commit comments