79
79
80
80
env :
81
81
SCCACHE_DIRECT : yes
82
+ ANDROID_API_LEVEL : 28
82
83
83
84
jobs :
84
85
context :
@@ -113,6 +114,7 @@ jobs:
113
114
swift_tools_support_core_revision : ${{ steps.context.outputs.swift_tools_support_core_revision }}
114
115
yams_revision : ${{ steps.context.outputs.yams_revision }}
115
116
zlib_revision : ${{ steps.context.outputs.zlib_revision }}
117
+ ANDROID_API_LEVEL : ${{ steps.context.outputs.ANDROID_API_LEVEL }}
116
118
CMAKE_C_FLAGS : ${{ steps.context.outputs.CMAKE_C_FLAGS }}
117
119
CMAKE_CXX_FLAGS : ${{ steps.context.outputs.CMAKE_CXX_FLAGS }}
118
120
CMAKE_EXE_LINKER_FLAGS : ${{ steps.context.outputs.CMAKE_EXE_LINKER_FLAGS }}
@@ -226,6 +228,8 @@ jobs:
226
228
echo windows_build_runner=${{ vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
227
229
echo compilers_build_runner=${{ vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT}
228
230
231
+ echo ANDROID_API_LEVEL=${{ env.ANDROID_API_LEVEL }} >> ${GITHUB_OUTPUT}
232
+
229
233
- uses : actions/upload-artifact@v4
230
234
with :
231
235
name : stable.xml
@@ -239,7 +243,64 @@ jobs:
239
243
strategy :
240
244
fail-fast : false
241
245
matrix :
242
- arch : ['amd64', 'arm64', 'x86']
246
+ include :
247
+ - arch : amd64
248
+ cc : cl
249
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
250
+ cxx : cl
251
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
252
+ os : Windows
253
+ extra_flags :
254
+
255
+ - arch : arm64
256
+ cc : cl
257
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
258
+ cxx : cl
259
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
260
+ os : Windows
261
+ extra_flags :
262
+
263
+ - arch : x86
264
+ cc : cl
265
+ cflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
266
+ cxx : cl
267
+ cxxflags : ${{ needs.context.outputs.CMAKE_C_FLAGS }}
268
+ os : Windows
269
+ extra_flags :
270
+
271
+ - arch : arm64
272
+ cc : clang
273
+ cflags : -ffunction-sections -fdata-sections -g
274
+ cxx : clang++
275
+ cxxflags : -ffunction-sections -fdata-sections -g
276
+ os : Android
277
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=arm64-v8a
278
+
279
+ - arch : armv7
280
+ cc : clang
281
+ cflags : -ffunction-sections -fdata-sections -g
282
+ cxx : clang++
283
+ cxxflags : -ffunction-sections -fdata-sections -g
284
+ os : Android
285
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=armeabi-v7a
286
+
287
+ - arch : i686
288
+ cc : clang
289
+ cflags : -ffunction-sections -fdata-sections -g
290
+ cxx : clang++
291
+ cxxflags : -ffunction-sections -fdata-sections -g
292
+ os : Android
293
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86
294
+
295
+ - arch : x86_64
296
+ cc : clang
297
+ cflags : -ffunction-sections -fdata-sections -g
298
+ cxx : clang++
299
+ cxxflags : -ffunction-sections -fdata-sections -g
300
+ os : Android
301
+ extra_flags : -D CMAKE_ANDROID_API=${{ needs.context.outputs.ANDROID_API_LEVEL }} -D CMAKE_ANDROID_ARCH_ABI=x86_64
302
+
303
+ name : ${{ matrix.os }} ${{ matrix.arch }} SQLite3
243
304
244
305
steps :
245
306
- uses : actions/checkout@v4
@@ -257,6 +318,7 @@ jobs:
257
318
run : Copy-Item ${{ github.workspace }}\SourceCache\swift-build\cmake\SQLite\CMakeLists.txt -destination ${{ github.workspace }}\SourceCache\sqlite-3.43.2\CMakeLists.txt
258
319
259
320
- uses : compnerd/gha-setup-vsdevenv@main
321
+ if : matrix.os == 'Windows'
260
322
with :
261
323
host_arch : amd64
262
324
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
@@ -266,7 +328,7 @@ jobs:
266
328
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
267
329
with :
268
330
max-size : 100M
269
- key : windows -${{ matrix.arch }}-sqlite
331
+ key : ${{ matrix.os }} -${{ matrix.arch }}-sqlite
270
332
variant : sccache
271
333
append-timestamp : false
272
334
@@ -275,14 +337,15 @@ jobs:
275
337
cmake -B ${{ github.workspace }}/BinaryCache/sqlite-3.43.2 `
276
338
-D BUILD_SHARED_LIBS=NO `
277
339
-D CMAKE_BUILD_TYPE=Release `
278
- -D CMAKE_C_COMPILER=cl `
340
+ -D CMAKE_C_COMPILER=${{ matrix.cc }} `
279
341
-D CMAKE_C_COMPILER_LAUNCHER=sccache `
280
- -D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
281
- -D CMAKE_CXX_COMPILER=cl `
342
+ -D CMAKE_C_FLAGS="${{ matrix.cflags }}" `
343
+ -D CMAKE_CXX_COMPILER=${{ matrix.cxx }} `
282
344
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
283
- -D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
345
+ -D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" `
284
346
-D CMAKE_MT=mt `
285
347
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr `
348
+ -D CMAKE_SYSTEM_NAME=${{ matrix.os }} `
286
349
-G Ninja `
287
350
-S ${{ github.workspace }}/SourceCache/sqlite-3.43.2
288
351
- name : Build SQLite
@@ -292,7 +355,7 @@ jobs:
292
355
293
356
- uses : actions/upload-artifact@v4
294
357
with :
295
- name : sqlite-${{ matrix.arch }}-3.43.2
358
+ name : sqlite-${{ matrix.os }}-${{ matrix. arch }}-3.43.2
296
359
path : ${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr
297
360
298
361
icu_tools :
@@ -1482,7 +1545,7 @@ jobs:
1482
1545
steps :
1483
1546
- uses : actions/download-artifact@v4
1484
1547
with :
1485
- name : sqlite-${{ matrix.arch }}-3.43.2
1548
+ name : sqlite-windows- ${{ matrix.arch }}-3.43.2
1486
1549
path : ${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr
1487
1550
- name : Download Compilers
1488
1551
uses : actions/download-artifact@v4
0 commit comments