1313 MIN_SDK : 21
1414
1515jobs :
16- build :
16+ build-android :
1717 runs-on : ubuntu-latest
1818 strategy :
1919 matrix :
@@ -64,10 +64,71 @@ jobs:
6464 with :
6565 name : sqlcipher-${{ matrix.toolchain }}
6666 path : sqlcipher/libsqlite3.so
67+
68+ build-linux :
69+ runs-on : ubuntu-latest
70+ steps :
71+ - name : Checkout
72+ uses : actions/checkout@v4
73+ with :
74+ submodules : true
75+
76+ - name : Build OpenSSL
77+ run : |
78+ cd openssl
79+ ./Configure -static -fpic -no-shared -no-fuzz-afl -no-fuzz-libfuzzer -no-tests -no-apps -ffunction-sections -fdata-sections
80+ make -j 4
81+
82+ - name : Build SQLCipher
83+ run : |
84+ OPENSSL_HEADERS=$(realpath openssl/include)
85+ OPENSSL_LIB=$(realpath openssl/libcrypto.a)
86+
87+ cd sqlcipher
88+ ./configure --with-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -I$OPENSSL_HEADERS" LDFLAGS="$OPENSSL_LIB"
89+ make -j 4
90+
91+ - name : Upload artifact
92+ uses : actions/upload-artifact@v4
93+ with :
94+ name : sqlcipher-linux
95+ path : sqlcipher/libsqlite3.so
96+
97+ build-mac :
98+ runs-on : macos-latest
99+ steps :
100+ - name : Checkout
101+ uses : actions/checkout@v4
102+ with :
103+ submodules : true
104+
105+ - name : Build OpenSSL
106+ run : |
107+ cd openssl
108+ ./Configure -static -fpic -no-shared -no-fuzz-afl -no-fuzz-libfuzzer -no-tests -no-apps -ffunction-sections -fdata-sections
109+ make -j 4
110+
111+ - name : Build SQLCipher
112+ run : |
113+ OPENSSL_HEADERS=$(realpath openssl/include)
114+ OPENSSL_LIB=$(realpath openssl/libcrypto.a)
115+
116+ cd sqlcipher
117+ ./configure --with-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -I$OPENSSL_HEADERS" LDFLAGS="$OPENSSL_LIB"
118+ make -j 4
119+
120+ - name : Upload artifact
121+ uses : actions/upload-artifact@v4
122+ with :
123+ name : sqlcipher-mac
124+ path : sqlcipher/libsqlite3.dylib
67125
68126 package :
69127 runs-on : ubuntu-latest
70- needs : build
128+ needs :
129+ - build-android
130+ - build-linux
131+ - build-mac
71132
72133 steps :
73134 - name : Checkout
@@ -86,6 +147,12 @@ jobs:
86147
87148 - name : Build
88149 run : |
150+ mkdir -p "Stratum.SQLCipher/runtimes/linux-x64"
151+ cp "artifacts/sqlcipher-linux/libsqlite3.so" "Stratum.SQLCipher/runtimes/linux-x64/libsqlcipher.so"
152+
153+ mkdir -p "Stratum.SQLCipher/runtimes/osx"
154+ cp "artifacts/sqlcipher-mac/libsqlite3.dylib" "Stratum.SQLCipher/runtimes/osx/libsqlcipher.dylib"
155+
89156 mkdir -p "Stratum.SQLCipher/runtimes/android-arm64-v8a"
90157 cp "artifacts/sqlcipher-aarch64-linux-android/libsqlite3.so" "Stratum.SQLCipher/runtimes/android-arm64-v8a/libsqlcipher.so"
91158
0 commit comments