3232 - run : bundle exec rake rubocop
3333
3434 basic :
35- needs : [" rubocop"]
35+ needs : rubocop
3636 runs-on : ubuntu-latest
3737 steps :
3838 - uses : actions/checkout@v4
4444 - run : bundle exec rake compile test -- --enable-system-libraries
4545
4646 test :
47- needs : [" basic"]
47+ needs : basic
4848 strategy :
4949 fail-fast : false
5050 matrix :
8585 fedora :
8686 # reported at https://github.com/sparklemotion/sqlite3-ruby/issues/354
8787 # TODO remove once https://github.com/flavorjones/mini_portile/issues/118 is fixed
88- needs : [" basic"]
88+ needs : basic
8989 name : " fedora:35"
9090 runs-on : ubuntu-latest
9191 container :
@@ -100,7 +100,7 @@ jobs:
100100 - run : bundle exec rake test
101101
102102 sqlcipher :
103- needs : [" basic"]
103+ needs : basic
104104 strategy :
105105 fail-fast : false
106106 matrix :
@@ -129,7 +129,7 @@ jobs:
129129 - run : bundle exec rake test
130130
131131 valgrind :
132- needs : [" basic"]
132+ needs : basic
133133 runs-on : ubuntu-latest
134134 steps :
135135 - uses : actions/checkout@v4
@@ -149,17 +149,17 @@ jobs:
149149 # gem tests (source and native)
150150 #
151151 native_setup :
152- needs : [" basic"]
152+ needs : basic
153153 name : " Setup for native gem tests"
154154 runs-on : ubuntu-latest
155155 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 }}
157157 steps :
158158 - uses : actions/checkout@v4
159159 - uses : actions/cache@v4
160160 with :
161161 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') }}
163163 - uses : ruby/setup-ruby@v1
164164 with :
165165 ruby-version : " 3.3"
@@ -168,114 +168,54 @@ jobs:
168168 - id : rcd_image_version
169169 run : bundle exec ruby -e 'require "rake_compiler_dock"; puts "rcd_image_version=#{RakeCompilerDock::IMAGE_VERSION}"' >> $GITHUB_OUTPUT
170170
171- cruby-package :
172- needs : ["native_setup"]
171+ build_source_gem :
172+ needs : native_setup
173+ name : " build source"
173174 runs-on : ubuntu-latest
174175 steps :
175176 - uses : actions/checkout@v4
176177 - uses : actions/cache@v4
177178 with :
178179 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') }}
180181 - uses : ruby/setup-ruby@v1
181182 with :
182183 ruby-version : " 3.3"
183184 bundler-cache : true
184185 - run : ./bin/test-gem-build gems ruby
185186 - uses : actions/upload-artifact@v3
186187 with :
187- name : cruby -gem
188+ name : source -gem
188189 path : gems
189190 retention-days : 1
190191
191- cruby-linux-install :
192- needs : ["cruby-package"]
192+ install_source_linux :
193+ needs : build_source_gem
194+ name : " test source"
193195 strategy :
194196 fail-fast : false
195197 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
219205 steps :
220206 - uses : actions/checkout@v4
221207 - uses : ruby/setup-ruby-pkgs@v1
222208 with :
223- ruby-version : " ${{matrix.ruby}}"
209+ ruby-version : ${{ matrix.ruby }}
210+ apt-get : libsqlite3-dev pkg-config
224211 brew : sqlite3 pkg-config
212+ mingw : sqlite3
225213 - uses : actions/download-artifact@v3
226214 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
274216 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
279219
280220 cruby-native-package :
281221 needs : ["native_setup"]
0 commit comments