55
55
56
56
env :
57
57
SCCACHE_DIRECT : yes
58
+ ANDROID_API_LEVEL : 28
58
59
59
60
jobs :
60
61
context :
89
90
swift_tools_support_core_revision : ${{ steps.context.outputs.swift_tools_support_core_revision }}
90
91
yams_revision : ${{ steps.context.outputs.yams_revision }}
91
92
zlib_revision : ${{ steps.context.outputs.zlib_revision }}
93
+ ANDROID_API_LEVEL : ${{ steps.context.outputs.ANDROID_API_LEVEL }}
92
94
CMAKE_C_FLAGS : ${{ steps.context.outputs.CMAKE_C_FLAGS }}
93
95
CMAKE_CXX_FLAGS : ${{ steps.context.outputs.CMAKE_CXX_FLAGS }}
94
96
CMAKE_EXE_LINKER_FLAGS : ${{ steps.context.outputs.CMAKE_EXE_LINKER_FLAGS }}
@@ -200,6 +202,8 @@ jobs:
200
202
echo windows_build_runner=${{ vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
201
203
echo compilers_build_runner=${{ vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
202
204
205
+ echo ANDROID_API_LEVEL=${{ env.ANDROID_API_LEVEL }} >> ${GITHUB_OUTPUT}
206
+
203
207
- uses : actions/upload-artifact@v4
204
208
with :
205
209
name : stable.xml
@@ -213,7 +217,64 @@ jobs:
213
217
strategy :
214
218
fail-fast : false
215
219
matrix :
216
- arch : ['amd64', 'arm64', 'x86']
220
+ include :
221
+ - arch : amd64
222
+ cc : cl
223
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
224
+ cxx : cl
225
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
226
+ os : Windows
227
+ extra_flags :
228
+
229
+ - arch : arm64
230
+ cc : cl
231
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
232
+ cxx : cl
233
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
234
+ os : Windows
235
+ extra_flags :
236
+
237
+ - arch : x86
238
+ cc : cl
239
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
240
+ cxx : cl
241
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
242
+ os : Windows
243
+ extra_flags :
244
+
245
+ - arch : arm64
246
+ cc : clang
247
+ cflags : -ffunction-sections -fdata-sections -g
248
+ cxx : clang++
249
+ cxxflags : -ffunction-sections -fdata-sections -g
250
+ os : Android
251
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=arm64-v8a
252
+
253
+ - arch : armv7
254
+ cc : clang
255
+ cflags : -ffunction-sections -fdata-sections -g
256
+ cxx : clang++
257
+ cxxflags : -ffunction-sections -fdata-sections -g
258
+ os : Android
259
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=armeabi-v7a
260
+
261
+ - arch : i686
262
+ cc : clang
263
+ cflags : -ffunction-sections -fdata-sections -g
264
+ cxx : clang++
265
+ cxxflags : -ffunction-sections -fdata-sections -g
266
+ os : Android
267
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86
268
+
269
+ - arch : x86_64
270
+ cc : clang
271
+ cflags : -ffunction-sections -fdata-sections -g
272
+ cxx : clang++
273
+ cxxflags : -ffunction-sections -fdata-sections -g
274
+ os : Android
275
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86_64
276
+
277
+ name : ${{ matrix.os }} ${{ matrix.arch }} SQLite3
217
278
218
279
steps :
219
280
- uses : actions/checkout@v4
@@ -231,6 +292,7 @@ jobs:
231
292
run : Copy-Item ${{ github.workspace }}\SourceCache\swift-build\cmake\SQLite\CMakeLists.txt -destination ${{ github.workspace }}\SourceCache\sqlite-3.43.2\CMakeLists.txt
232
293
233
294
- uses : compnerd/gha-setup-vsdevenv@main
295
+ if : matrix.os == 'Windows'
234
296
with :
235
297
host_arch : amd64
236
298
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
@@ -240,7 +302,7 @@ jobs:
240
302
241
303
with :
242
304
max-size : 100M
243
- key : windows -${{ matrix.arch }}-sqlite
305
+ key : ${{ matrix.os }} -${{ matrix.arch }}-sqlite
244
306
variant : sccache
245
307
append-timestamp : false
246
308
@@ -249,14 +311,15 @@ jobs:
249
311
cmake -B ${{ github.workspace }}/BinaryCache/sqlite-3.43.2 `
250
312
-D BUILD_SHARED_LIBS=NO `
251
313
-D CMAKE_BUILD_TYPE=Release `
252
- -D CMAKE_C_COMPILER=cl `
314
+ -D CMAKE_C_COMPILER=${{ matrix.cc }} `
253
315
-D CMAKE_C_COMPILER_LAUNCHER=sccache `
254
- -D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
255
- -D CMAKE_CXX_COMPILER=cl `
316
+ -D CMAKE_C_FLAGS="${{ matrix.cflags }}" `
317
+ -D CMAKE_CXX_COMPILER=${{ matrix.cxx }} `
256
318
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
257
- -D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
319
+ -D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" `
258
320
-D CMAKE_MT=mt `
259
321
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr `
322
+ -D CMAKE_SYSTEM_NAME=${{ matrix.os }} `
260
323
-G Ninja `
261
324
-S ${{ github.workspace }}/SourceCache/sqlite-3.43.2
262
325
- name : Build SQLite
@@ -266,7 +329,7 @@ jobs:
266
329
267
330
- uses : actions/upload-artifact@v4
268
331
with :
269
- name : sqlite-${{ matrix.arch }}-3.43.2
332
+ name : sqlite-${{ matrix.os }}-${{ matrix. arch }}-3.43.2
270
333
path : ${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr
271
334
272
335
icu_tools :
@@ -1451,7 +1514,7 @@ jobs:
1451
1514
steps :
1452
1515
- uses : actions/download-artifact@v4
1453
1516
with :
1454
- name : sqlite-${{ matrix.arch }}-3.43.2
1517
+ name : sqlite-windows- ${{ matrix.arch }}-3.43.2
1455
1518
path : ${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr
1456
1519
- name : Download Compilers
1457
1520
uses : actions/download-artifact@v4
0 commit comments