From 5d1fa20733062afe329c23e0838e97f49fde5347 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sat, 3 Jun 2023 17:38:19 +0300 Subject: [PATCH] ci: update workflow Signed-off-by: R4SAS --- .github/workflows/android.yml | 62 ++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cc63a87..dc09244 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,22 +13,26 @@ jobs: run: | sudo apt-get update sudo apt-get install -y g++ - - name: Setup JDK 1.11 - uses: actions/setup-java@v1 + - name: Setup JDK 11 + uses: actions/setup-java@v3 with: - java-version: 1.11 - - name: Setup Android SDK - uses: maxim-lobanov/setup-android-tools@v1 - with: - packages: | - build-tools;32.0.0 - platforms;android-32 - ndk;23.2.8568313 - cmake;3.22.1 - cache: true + distribution: 'oracle' + java-version: '11' + java-package: jdk + cache: 'gradle' + #- name: Setup Android SDK + # uses: maxim-lobanov/setup-android-tools@v1 + # with: + # packages: | + # build-tools;32.0.0 + # platforms;android-32 + # ndk;23.2.8568313 + # cmake;3.22.1 + # cache: true + - name: Install required Android SDK packages + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager install "ndk;23.2.8568313" - name: Build required modules run: | - export ANDROID_SDK_ROOT=$ANDROID_HOME export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313 pushd app/jni ./build_boost.sh @@ -38,7 +42,7 @@ jobs: - name: Build with Gradle run: ./gradlew --no-daemon assembleDebug - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: android-apks path: app/build/outputs/apk/debug/*.apk @@ -53,20 +57,24 @@ jobs: run: | sudo apt-get update sudo apt-get install -y g++ - - name: Setup JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Setup Android SDK - uses: maxim-lobanov/setup-android-tools@v1 + - name: Setup JDK 11 + uses: actions/setup-java@v3 with: - packages: | - ndk;23.2.8568313 - cmake;3.22.1 - cache: true + distribution: 'oracle' + java-version: '11' + java-package: jdk + cache: 'gradle' + #- name: Setup Android SDK + # uses: maxim-lobanov/setup-android-tools@v1 + # with: + # packages: | + # ndk;23.2.8568313 + # cmake;3.22.1 + # cache: true + - name: Install required Android SDK packages + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager install "ndk;23.2.8568313" - name: Build required modules run: | - export ANDROID_SDK_ROOT=$ANDROID_HOME export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313 pushd binary/jni ./build_boost.sh @@ -84,12 +92,12 @@ jobs: ./build-archive popd - name: Upload binaries archive - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: android-binaries path: binary/libs/* - name: Upload binaries package - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: android-binaries-pack path: contrib/binary_pack/i2pd_*_android_binary.zip