Skip to content

[auto] update android-34 at 2024-02-02 10:38 #7

[auto] update android-34 at 2024-02-02 10:38

[auto] update android-34 at 2024-02-02 10:38 #7

Workflow file for this run

name: Test
on:
push:
branches: [ Qt6 ]
pull_request:
branches: [ Qt6 ]
env:
BUILD_TYPE: Release
NDK_VERSION: r23b # 23.1.7779620
QT_VERSION: 6.4.3
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- qt: android_armv7
abi: armeabi-v7a
- qt: android_arm64_v8a
abi: arm64-v8a
- qt: android_x86
abi: x86
- qt: android_x86_64
abi: x86_64
android-api-version:
- android-28
- android-29
- android-30
- android-31
- android-32
- android-33
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: ${{ env.NDK_VERSION }}
- name: Install host Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: 'install-qt-action-${{ runner.os }}-${{ env.QT_VERSION }}'
version: ${{ env.QT_VERSION }}
- name: Get host Qt path
id: host-qt-path
uses: actions/github-script@v6
with:
script: return "${{ env.Qt6_DIR }}"
result-encoding: string
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: 'install-qt-action-${{ runner.os }}-${{ env.QT_VERSION }}-${{ matrix.arch.qt }}'
version: ${{ env.QT_VERSION }}
host: linux
target: android
arch: ${{ matrix.arch.qt }}
- name: Configure CMake
run: |
cmake -B ./build -S ${{ matrix.android-api-version }} \
-G"Unix Makefiles" \
-DCMAKE_BUILD_TYPE:STRING=${{ env.BUILD_TYPE }} \
-DANDROID_NDK:PATH=${{ steps.setup-ndk.outputs.ndk-path }} \
-DCMAKE_TOOLCHAIN_FILE:PATH=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DCMAKE_FIND_ROOT_PATH:PATH=${{ env.Qt6_DIR }} \
-DQT_HOST_PATH:PATH=${{ steps.host-qt-path.outputs.result }} \
-DANDROID_ABI:STRING=${{ matrix.arch.abi }} \
-DCMAKE_INSTALL_PREFIX=./install \
-DQT_ANDROID_API_TEST:BOOL=ON
- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@v1
- name: Build
run: cmake --build ./build --config ${{ env.BUILD_TYPE }} -j ${{ steps.cpu-cores.outputs.count }}