Files
android-client/.github/workflows/build-debug.yml
Zoltan Papp f81f81ce6e rewrite client in Java (#54)
Rewrite the client in native Java.

There were no new features added in this change, but that's the first step in moving to a faster development cycle for NetBird client.
2025-06-05 20:37:51 +02:00

55 lines
1.7 KiB
YAML

name: build debug
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
cache: "gradle"
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.23.3"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 12266719
- name: NDK Cache
id: ndk-cache
uses: actions/cache@v3
with:
path: /usr/local/lib/android/sdk/ndk
key: ndk-cache-23.1.7779620
- name: Setup NDK
run: /usr/local/lib/android/sdk/cmdline-tools/16.0/bin/sdkmanager --install "ndk;23.1.7779620"
- name: Install gomobile
run: go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20230531173138-3c911d8e3eda
- name: Build NetBird Go library
run: PATH=$PATH:$(go env GOPATH)/bin bash -x build-android-lib.sh
env:
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/23.1.7779620
- name: Get short Git hash
run: echo "SHORT_GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Build debug apk
run: ./gradlew --no-daemon assembleDebug -PversionName="ci-${SHORT_GIT_SHA}"
- name: Upload non tags for debug purposes
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 1