diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 247331a..cfaeff8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,12 @@ jobs: with: toolchain: stable targets: aarch64-unknown-linux-gnu + # install openssl for aarch64 + - run: sudo dpkg --add-architecture arm64 + - run: sudo apt-get update + - run: sudo apt-get install -y libssl-dev:arm64 + - run: export OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu + - run: export OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu - run: cargo install cross - run: cross build --release --target aarch64-unknown-linux-gnu - uses: actions/upload-artifact@v4 @@ -113,9 +119,18 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - targets: aarch64-linux-android, armv7-linux-androideabi + targets: aarch64-linux-android - run: cargo install cargo-ndk - - run: cargo ndk -t arm64-v8a -t armeabi-v7a -o ./jniLibs build --release + - run: curl -L https://github.com/217heidai/openssl_for_android/releases/download/3.2.0/OpenSSL_3.2.0_arm64-v8a.tar.gz -o OpenSSL_3.2.0_arm64-v8a.tar.gz + - run: curl -L https://github.com/217heidai/openssl_for_android/releases/download/3.2.0/OpenSSL_3.2.0_armeabi-v7a.tar.gz -o OpenSSL_3.2.0_armeabi-v7a.tar.gz + - run: tar -xzf OpenSSL_3.2.0_arm64-v8a.tar.gz + - run: tar -xzf OpenSSL_3.2.0_armeabi-v7a.tar.gz + - run: export OPENSSL_LIB_DIR=$PWD/OpenSSL_3.2.0_arm64-v8a/lib + - run: export OPENSSL_INCLUDE_DIR=$PWD/OpenSSL_3.2.0_arm64-v8a/include + - run: cargo ndk -t arm64-v8a -o ./jniLibs build --release + - run: export OPENSSL_LIB_DIR=$PWD/OpenSSL_3.2.0_armeabi-v7a/lib + - run: export OPENSSL_INCLUDE_DIR=$PWD/OpenSSL_3.2.0_armeabi-v7a/include + - run: cargo ndk -t armeabi-v7a -o ./jniLibs build --release - uses: actions/upload-artifact@v4 with: name: android-universal diff --git a/Cargo.toml b/Cargo.toml index 5050cbf..4c990ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,6 @@ sysinfo = "0.30.1" clap = { version = "4.4.11", features = ["derive"] } urlencoding = "2.1.3" tokio-stream = "0.1.14" -openssl = { version = "0.10.62", features = ["vendored"] } [lib] path = "src/lib.rs"