Skip to content

Install required Java for sdkmanager #38

Install required Java for sdkmanager

Install required Java for sdkmanager #38

Workflow file for this run

name: Android
on: [ push, pull_request ]
env:
BUILD_TYPE: Release
QT_VERSION: "6.6.2"
QT_ARCH: "android_arm64_v8a"
QT_HOST_ARCH: "gcc_64"
QT_TARGET: "android"
# https://doc.qt.io/qt-6/android-getting-started.html
PLATFORM_VERSION: "33"
BUILD_TOOLS_VERSION: "33.0.0"
NDK_VERSION: "25.1.8937393"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
with:
path: ${{runner.workspace}}/Qt
key: qt-${{env.QT_VERSION}}-${{env.QT_ARCH}}-${{env.QT_HOST_ARCH}}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: 'cmdline-tools;latest platform-tools platforms;android-${{env.PLATFORM_VERSION}} build-tools;${{env.BUILD_TOOLS_VERSION}} ndk;${{env.NDK_VERSION}}'
- name: Install Qt (Android)
uses: jurplel/install-qt-action@v3
with:
cached: ${{steps.cache-qt.outputs.cache-hit}}
version: ${{env.QT_VERSION}}
arch: ${{env.QT_ARCH}}
target: ${{env.QT_TARGET}}
- name: Install Qt (Linux)
uses: jurplel/install-qt-action@v3
with:
cached: ${{steps.cache-qt.outputs.cache-hit}}
version: ${{env.QT_VERSION}}
arch: ${{env.QT_HOST_ARCH}}
- name: Configure CMake
env:
QT_HOST_PATH: ${{runner.workspace}}/Qt/${{env.QT_VERSION}}/${{env.QT_HOST_ARCH}}
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/${{env.NDK_VERSION}}
run: ${{runner.workspace}}/Qt/$QT_VERSION/$QT_ARCH/bin/qt-cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
run: cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: spotify-qt-quick
path: |
${{runner.workspace}}/spotify-qt-quick/android-build/build/outputs/apk/debug/*.apk
${{runner.workspace}}/spotify-qt-quick/android-build/build.gradle
${{runner.workspace}}/spotify-qt-quick/android-build/gradle.properties