-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (79 loc) · 2.49 KB
/
Test-Qt6.yaml
File metadata and controls
79 lines (79 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Test
on:
push:
branches: [ Qt6 ]
pull_request:
branches: [ Qt6 ]
env:
BUILD_TYPE: Release
NDK_VERSION: r26b # 26.1.10909125
QT_VERSION: 6.8.2
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
- android-34
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 }}