Repository navigation
191 lines (177 loc) · 5.2 KB
/
Copy pathci4sqlite3mc.yml
File metadata and controls
191 lines (177 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: CI for SQLite3 Multiple Ciphers
on:
push:
branches:
- main
- aegis
- aes-revise
- hwaccel
- register-dynamic-cipher
- temp-crypt
pull_request:
branches:
- main
jobs:
host_unix:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
cc_compiler: [gcc, clang]
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.cc_compiler }}
steps:
- name: Install dependencies (macOS)
run: brew install automake
if: matrix.os == 'macos-latest'
- name: Checkout
uses: actions/checkout@v7
- name: Configure
run: |
autoreconf
./configure
- name: Build
run: |
make
- name: Testing
run: |
cat /proc/cpuinfo | grep flags | head -1
gcc --version
clang --version
./sqlite3shell test1.db3 ".read test/test1.sql"
./sqlite3shell test2.db3 ".read test/test2.sql"
./sqlite3shell test/persons-aegis-testkey.db3 ".read test/test3.sql"
./sqlite3shell test/persons-ascon128-testkey.db3 ".read test/test4.sql"
./sqlite3shell dummy.db3 ".read test/sqlciphertest.sql"
- name: Crypto tests
run: |
make cryptotest
./cryptotest
- name: Temporary file tests
run: |
make tempfiletest
./tempfiletest 20000
./tempfiletest 20000 1 faults
./tempfiletest 20000 1 db4096
./tempfiletest 20000 1 chunk faults
- name: Allocation failure tests
run: |
make oomtest
./oomtest
- name: Rekeying tests
run: |
make rekeytest
./rekeytest
- name: Thread tests
run: |
make threadtest
./threadtest
- name: AES tests
run: |
make aestest
./aestest
- name: Crash tests
run: |
make crashtest
./crashtest
- name: VFS stack tests
run: |
make vfsstacktest
./vfsstacktest
- name: Zero page tests
run: |
make zeropagetest
./zeropagetest
- name: Tests with random values directly from the OS
if: matrix.cc_compiler == 'gcc'
run: |
make distclean
./configure CFLAGS="-g -O2 -DSQLITE3MC_USE_OS_RNG=1"
make cryptotest tempfiletest oomtest rekeytest threadtest crashtest vfsstacktest zeropagetest
./cryptotest
./tempfiletest 20000
./tempfiletest 20000 1 faults
./oomtest
./rekeytest
./threadtest
./crashtest
./vfsstacktest
./zeropagetest
windows_clang_cl:
# clang-cl defines both _MSC_VER and __SIZEOF_INT128__, a combination that
# neither the MSVC nor the gcc/clang CI jobs cover (see issue #319).
name: Windows clang-cl (${{ matrix.arch }})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch: [x64, ARM64]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Configure
run: cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -T ClangCL
- name: Verify that clang-cl is used
shell: bash
run: |
f=$(find build -name CMakeCCompiler.cmake | head -1)
grep -E "CMAKE_C_COMPILER_(ID|FRONTEND_VARIANT) " "$f"
grep -q 'CMAKE_C_COMPILER_ID "Clang"' "$f"
grep -q 'CMAKE_C_COMPILER_FRONTEND_VARIANT "MSVC"' "$f"
- name: Build
run: cmake --build build --config Release
# ARM64 binaries are only cross-compiled here; the runner is x64.
- name: Testing
if: matrix.arch == 'x64'
shell: bash
run: |
sh=build/Release/sqlite3mc_shell.exe
$sh test1.db3 ".read test/test1.sql"
$sh test2.db3 ".read test/test2.sql"
$sh test/persons-aegis-testkey.db3 ".read test/test3.sql"
$sh test/persons-ascon128-testkey.db3 ".read test/test4.sql"
$sh dummy.db3 ".read test/sqlciphertest.sql"
android_build:
name: Android (API ${{ matrix.api-level }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
api-level: [21, 28, 30, 34]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r28
- name: Configure
run: >
cmake -B build
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake
-DANDROID_ABI=arm64-v8a
-DANDROID_PLATFORM=${{ matrix.api-level }}
- name: Build
run: cmake --build build
secure_memory_clang:
# The secure memory code (SQLITE3MC_SECURE_MEMORY=1) is compiled only when
# requested, and the other jobs never request it. The CMake build is used
# because the autotools build passes -std=c99, which selects a different
# atomics branch than the default C standard of clang.
name: Secure memory (clang, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
env:
CC: clang
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Configure
run: cmake -B build -DSQLITE3MC_SECURE_MEMORY=ON
- name: Build
run: cmake --build build