@@ -137,8 +137,9 @@ jobs:
137
137
matrix :
138
138
os : [ubuntu-latest, windows-latest, macos-latest]
139
139
dart : [stable, dev]
140
+ sqlite : [system, compiled]
140
141
141
- name : Unit tests with Dart ${{ matrix.dart }} on ${{ matrix.os }}
142
+ name : Unit tests with Dart ${{ matrix.dart }} on ${{ matrix.os }} with ${{ matrix.sqlite }} sqlite
142
143
runs-on : ${{ matrix.os }}
143
144
144
145
steps :
@@ -148,34 +149,40 @@ jobs:
148
149
sdk : ${{ matrix.dart }}
149
150
150
151
- name : Download compiled sqlite3
151
- if : runner.os == 'Linux' || runner.os == 'Windows' || runner.os == 'macOS'
152
+ if : matrix.sqlite == 'compiled' && ( runner.os == 'Linux' || runner.os == 'Windows' || runner.os == 'macOS')
152
153
uses : actions/download-artifact@v4
153
154
with :
154
155
name : sqlite3-${{ runner.os }}
155
156
path : sqlite/out
156
157
157
158
- name : Install compiled sqlite3 (Linux)
158
- if : runner.os == 'Linux'
159
+ if : matrix.sqlite == 'compiled' && runner.os == 'Linux'
159
160
run : |
160
161
chmod a+x sqlite/out/sqlite3
161
162
realpath sqlite/out >> $GITHUB_PATH
162
163
echo "LD_LIBRARY_PATH=$(realpath sqlite/out)" >> $GITHUB_ENV
163
164
echo "C_INCLUDE_PATH=$(realpath sqlite/out)" >> $GITHUB_ENV
165
+ - name : Install system sqlite3 (Ubuntu)
166
+ if : matrix.sqlite == 'system' && runner.os == 'Linux'
167
+ run : sudo apt install sqlite3
164
168
- name : Install compiled sqlite3 (macOS)
165
- if : runner.os == 'macOS'
169
+ if : matrix.sqlite == 'compiled' && runner.os == 'macOS'
166
170
run : |
167
171
chmod a+x sqlite/out/sqlite3
168
172
echo "$(pwd)/sqlite/out" >> $GITHUB_PATH
169
173
echo "DYLD_LIBRARY_PATH=$(pwd)/sqlite/out" >> $GITHUB_ENV
170
174
echo "CPATH=$(pwd)/sqlite/out" >> $GITHUB_ENV
171
175
- uses : ilammy/msvc-dev-cmd@v1
172
- if : runner.os == 'Windows'
176
+ if : matrix.sqlite == 'compiled' && runner.os == 'Windows'
173
177
- name : Install compiled sqlite3 (Windows)
174
- if : runner.os == 'Windows'
178
+ if : matrix.sqlite == 'compiled' && runner.os == 'Windows'
175
179
run : |
176
180
echo $env:path
177
181
Resolve-Path -Path "sqlite/out" >> $env:GITHUB_PATH
178
182
"INCLUDE=" + $env:INCLUDE + ";" + (Resolve-Path -Path "sqlite/out") >> $env:GITHUB_EN
183
+ - name : Check if Winsqlite exists
184
+ if : matrix.sqlite == 'system' && runner.os == 'Windows'
185
+ run : Test-Path C:\Windows\System32\winsqlite3.dll
179
186
180
187
- uses : actions/cache@v4
181
188
with :
@@ -188,11 +195,11 @@ jobs:
188
195
- name : Test sqlite3 package
189
196
run : |
190
197
dart pub get
191
- dart test -P ci
198
+ dart test --test-randomize-ordering-seed "random" - P ci
192
199
working-directory : sqlite3/
193
200
194
201
- name : Test with SQLITE_OMIT_AUTOINIT
195
- if : runner.os == 'Linux'
202
+ if : matrix.sqlite == 'compiled' && runner.os == 'Linux'
196
203
run : |
197
204
ls $LD_LIBRARY_PATH
198
205
dart run tool/check_compile_time_option.dart OMIT_AUTOINIT
@@ -202,6 +209,7 @@ jobs:
202
209
working-directory : sqlite3/
203
210
204
211
- name : Test sqlite3_test package
212
+ if : matrix.sqlite != 'system' || runner.os != 'Windows'
205
213
run : |
206
214
dart pub get
207
215
dart test
@@ -215,7 +223,7 @@ jobs:
215
223
# If browsers behave differently on different platforms, surely that's not our fault...
216
224
# So, only run browser tests on Linux to be faster.
217
225
# todo: Something broke Dart web tests in Dart 2.18, it looks like this is related to finalizers
218
- if : runner.os == 'Linux'
226
+ if : matrix.sqlite == 'compiled' && runner.os == 'Linux'
219
227
working-directory : sqlite3/
220
228
221
229
# The integration tests for android are currently broken (the emulator doesn't want to
0 commit comments