Skip to content

Commit

Permalink
Use android-actions/setup-android to fix android build (java-native-a…
Browse files Browse the repository at this point in the history
…ccess#648)

Motivation:

We should use android-actions/setup-android when building for android

Modifications:

Use android-actions/setup-android for android build jobs

Result:

Android build works again
  • Loading branch information
normanmaurer authored Jan 24, 2024
1 parent 9509d3f commit db92d88
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ jobs:
**/hs_err*.log
build-android:
if: ${{ false }}
runs-on: ubuntu-latest
name: android
env:
Expand Down Expand Up @@ -175,11 +174,16 @@ jobs:
distribution: zulu
java-version: 8

- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 8512546

- name: Install Android SDK platforms
run: ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;${{ env.SDK_VER }}"
run: sdkmanager "platforms;${{ env.SDK_VER }}"

- name: Install Android NDK
run: ${ANDROID_HOME}/tools/bin/sdkmanager "ndk;${{ env.NDK_VER }}"
run: sdkmanager "ndk;${{ env.NDK_VER }}"

- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ jobs:
**/hs_err*.log
build-pr-android:
if: ${{ false }}
runs-on: ubuntu-latest
name: android
env:
Expand Down Expand Up @@ -186,11 +185,16 @@ jobs:
distribution: zulu
java-version: 8

- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 8512546

- name: Install Android SDK platforms
run: ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;${{ env.SDK_VER }}"
run: sdkmanager "platforms;${{ env.SDK_VER }}"

- name: Install Android NDK
run: ${ANDROID_HOME}/tools/bin/sdkmanager "ndk;${{ env.NDK_VER }}"
run: sdkmanager "ndk;${{ env.NDK_VER }}"

- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
Expand Down

0 comments on commit db92d88

Please sign in to comment.