|
40 | 40 | configure: |
41 | 41 | --host aarch64-linux-android26 |
42 | 42 | --with-openssl=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr |
43 | | - LIBS="-lssl -lcrypto -lc++" |
| 43 | + LIBS="-lssl -lcrypto" |
44 | 44 | AR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar |
45 | 45 | AS=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as |
46 | 46 | CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang |
|
57 | 57 | configure: |
58 | 58 | --host x86_64-linux-android26 |
59 | 59 | --with-openssl=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr |
60 | | - LIBS="-lssl -lcrypto -lc++" |
| 60 | + LIBS="-lssl -lcrypto" |
61 | 61 | AR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar |
62 | 62 | AS=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as |
63 | 63 | CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android26-clang |
@@ -110,30 +110,29 @@ jobs: |
110 | 110 | extract: true |
111 | 111 | fileName: curl-*.tar.gz |
112 | 112 |
|
113 | | - - name: build boringssl |
| 113 | + - name: build openssl |
114 | 114 | if: matrix.name == 'android' |
115 | 115 | run: | |
116 | | - git clone https://boringssl.googlesource.com/boringssl |
117 | | - cd boringssl |
118 | | - mkdir build |
119 | | - cd build |
120 | | - cmake \ |
121 | | - -DANDROID_ABI=${{ matrix.arch }} \ |
122 | | - -DANDROID_PLATFORM=android-26 \ |
123 | | - -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \ |
124 | | - -DOPENSSL_SMALL=1 \ |
125 | | - -DCMAKE_BUILD_TYPE=Release \ |
126 | | - -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ |
127 | | - -DBUILD_SHARED_LIBS=OFF \ |
128 | | - -DCMAKE_EXE_LINKER_FLAGS="-static" \ |
129 | | - .. |
| 116 | + git clone https://github.com/openssl/openssl.git |
| 117 | + cd openssl |
| 118 | + export TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64 |
| 119 | + export ANDROID_API=26 |
| 120 | + export ARCH=${{ matrix.arch }} |
| 121 | + export PATH=$TOOLCHAIN/bin:$PATH |
| 122 | + TARGET=android-${{ matrix.arch == 'arm64-v8a' && 'arm64' || matrix.arch }} |
| 123 | +
|
| 124 | + ./Configure $TARGET \ |
| 125 | + --prefix=$PWD/build \ |
| 126 | + --openssldir=$PWD/build/ssl \ |
| 127 | + no-shared \ |
| 128 | + no-unit-test \ |
| 129 | + -D__ANDROID_API__=$ANDROID_API |
130 | 130 | make |
| 131 | + make install_sw |
131 | 132 |
|
132 | | - cd .. |
133 | | - TOOLCHAIN="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64" |
134 | | - cp build/libssl.a $TOOLCHAIN/sysroot/usr/lib/ |
135 | | - cp build/libcrypto.a $TOOLCHAIN/sysroot/usr/lib/ |
136 | | - cp -r include/openssl $TOOLCHAIN/sysroot/usr/include/ |
| 133 | + cp build/lib/libssl.a $TOOLCHAIN/sysroot/usr/lib/ |
| 134 | + cp build/lib/libcrypto.a $TOOLCHAIN/sysroot/usr/lib/ |
| 135 | + cp -r build/include/openssl $TOOLCHAIN/sysroot/usr/include/ |
137 | 136 | |
138 | 137 | - name: build curl |
139 | 138 | run: | |
@@ -242,7 +241,7 @@ jobs: |
242 | 241 | export ${{ matrix.make }} |
243 | 242 | $CC sqlite-amalgamation-*/shell.c sqlite-amalgamation-*/sqlite3.c -o sqlite3 -ldl |
244 | 243 | # remove unused folders to save up space |
245 | | - rm -rf sqlite-amalgamation-*.zip sqlite-amalgamation-* curl-* boringssl |
| 244 | + rm -rf sqlite-amalgamation-*.zip sqlite-amalgamation-* curl-* openssl |
246 | 245 | echo "::endgroup::" |
247 | 246 |
|
248 | 247 | echo "::group::prepare the test script" |
@@ -296,7 +295,8 @@ jobs: |
296 | 295 | runs-on: ubuntu-latest |
297 | 296 | name: release |
298 | 297 | needs: build |
299 | | - #if: github.ref == 'refs/heads/main' |
| 298 | + if: always() |
| 299 | + #github.ref == 'refs/heads/main' |
300 | 300 |
|
301 | 301 | env: |
302 | 302 | GH_TOKEN: ${{ github.token }} |
|
0 commit comments