Build Cloak plugin for MacOS NE #286
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: android-openssl | |
on: [push] | |
jobs: | |
Build-Libs-OpenSSL-Android: | |
name: 'Build-OpenSSL-Lib-Android' | |
runs-on: ubuntu-latest | |
if: | | |
contains(github.event.head_commit.message, '[all]') || | |
contains(github.event.head_commit.message, '[android]') || | |
contains(github.event.head_commit.message, '[android-openssl]') || | |
contains(github.event.head_commit.message, '[openssl]') | |
env: | |
ANDROID_MIN_SDK: 24 | |
ANDROID_NDK_VERSION: 'r26b' | |
strategy: | |
matrix: | |
include: | |
- arch: arm64-v8a | |
target: android-arm64 | |
- arch: armeabi-v7a | |
target: android-arm | |
- arch: x86_64 | |
target: android-x86_64 | |
- arch: x86 | |
target: android-x86 | |
steps: | |
- name: 'Setup Android NDK' | |
id: setup-ndk | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: ${{ env.ANDROID_NDK_VERSION }} | |
- name: 'Install patchelf' | |
run: sudo apt-get install -y patchelf | |
- name: 'Get openssl' | |
uses: actions/checkout@v4 | |
with: | |
repository: openssl/openssl | |
ref: openssl-3.0.13 | |
path: openssl | |
- name: 'Build OpenSSL Android' | |
run: | | |
cd openssl | |
PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH | |
./Configure ${{ matrix.target }} shared no-tests -D__ANDROID_API__=${{ env.ANDROID_MIN_SDK }} | |
make -j$(nproc) SHLIB_VERSION_NUMBER= build_libs | |
mkdir -p build/${{ matrix.arch }} | |
cp libcrypto.so ./build/${{ matrix.arch }}/libcrypto_3.so | |
cp libssl.so ./build/${{ matrix.arch }}/libssl_3.so | |
cp libcrypto.a ./build/${{ matrix.arch }}/libcrypto.a | |
cp libssl.a ./build/${{ matrix.arch }}/libssl.a | |
[ ${{ matrix.arch }} == arm64-v8a ] && cp -a ./include/. ./build/include | |
cd ./build/${{ matrix.arch }} | |
patchelf --debug --set-soname libcrypto_3.so libcrypto_3.so | |
patchelf --debug --set-soname libssl_3.so libssl_3.so | |
patchelf --debug --replace-needed libcrypto.so libcrypto_3.so libssl_3.so | |
- name: 'Archive Android OpenSSL libs' | |
uses: actions/upload-artifact@v4 | |
with: | |
retention-days: 1 | |
name: android-openssl-${{ matrix.arch }} | |
path: openssl/build | |
github-release: | |
name: GitHub Release | |
needs: Build-Libs-OpenSSL-Android | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: android-openssl | |
merge-multiple: true | |
- name: Setup | Checksums | |
run: for file in $(find ./ -regex '.*\.\(a\|so\)' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | |
- name: Zip ALL | |
run: for file in *; do zip -r ${file%.*}.zip $file; done | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: android-openssl.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |