[Openvpn-devel,S] Change in openvpn[master]: Add android build to Github Actions

Message ID 991534b17e0d7ea6815039e7bc17021d3e6e9d04-HTML@gerrit.openvpn.net
State Superseded
Headers show
Series [Openvpn-devel,S] Change in openvpn[master]: Add android build to Github Actions | expand

Commit Message

stipa (Code Review) Feb. 13, 2025, 3:25 p.m. UTC
Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/896?usp=email

to review the following change.


Change subject: Add android build to Github Actions
......................................................................

Add android build to Github Actions

Change-Id: Ieb787a040f9eaf34d9d16996af1d63d7eae94944
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
M .github/workflows/build.yaml
1 file changed, 24 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/96/896/1

Patch

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 3ebea79..0be5440 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -35,6 +35,30 @@ 
         run: test ! -s uncrustify-changes.patch
         working-directory: openvpn
 
+  android:
+    runs-on: ubuntu-24.04
+    name: "Android - arm64"
+    # Github images already setup NDK with ANDROID_NDK_ROOT pointing to the root
+    # of the SDK
+    env:
+      VCPKG_DEFAULT_TRIPLET: arm64-android
+      VCPKG_ROOT: ${{ github.workspace }}/vcpkg
+      VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg/installed
+    steps:
+      - name: Checkout OpenVPN
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      - name: Install vcpkg
+        uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
+        with:
+          vcpkgGitCommitId: 80d54ff62d528339c626a6fbc3489a7f25956ade
+      - name: Install dependencies
+        run: ${VCPKG_ROOT}/vcpkg install openssl lz4 cmocka
+      - name: configure OpenVPN with cmake
+        run: cmake -S . -B openvpn-build -DUNSUPPORTED_BUILDS=yes -DCMAKE_SYSTEM_NAME=Android -DOPENSSL_ROOT_DIR=${VCPKG_INSTALLED_DIR}/arm64-android -DENABLE_PKCS11=false -DBUILD_TESTING=true -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DENABLE_LZO=false
+      - name: Build OpenVPN Android binary with cmake
+        run: cmake --build openvpn-build
+
+
   mingw:
     strategy:
       fail-fast: false