-
-
Notifications
You must be signed in to change notification settings - Fork 19
102 lines (88 loc) · 2.96 KB
/
builds_mobile.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#-------------------------------------------------------------------------------
# Workflow configuration
#-------------------------------------------------------------------------------
name: "Mobile CI builds (qmake)"
on:
push:
pull_request:
workflow_dispatch:
#-------------------------------------------------------------------------------
# Define application name & version
#-------------------------------------------------------------------------------
env:
APP_NAME: "QmlAppTemplate"
APP_VERSION: "0.7"
QT_VERSION: "6.6.3"
#-------------------------------------------------------------------------------
# Workflow jobs
#-------------------------------------------------------------------------------
jobs:
## Android build #############################################################
build-android:
name: "Android CI build"
runs-on: ubuntu-20.04
steps:
# Checkout repository (and submodules)
- name: Checkout repository (and submodules)
uses: actions/checkout@v4
with:
submodules: recursive
# Java environment (already installed in 'ubuntu-20.04')
- name: Setup Java environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# Android environment (already installed in 'ubuntu-20.04')
#- name: Setup Android environment
# uses: android-actions/setup-android@v3
#- name: Install Android SDK / NDK / tools
# run: |
# sdkmanager "platforms;android-34"
# sdkmanager "ndk;26.1.10909125"
# sdkmanager "build-tools;34.0.0"
# Install Qt (desktop & Android)
- name: Install Qt (desktop)
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
host: 'linux'
target: 'android'
arch: 'android_arm64_v8a'
extra: '--autodesktop'
# Setup env
- name: Setup env
run: |
qmake --version
# Build application
- name: Build application
run: |
qmake ${{env.APP_NAME}}.pro CONFIG+=release
make -j$(nproc)
## iOS build #################################################################
build-ios:
name: "iOS CI build"
runs-on: macos-12
steps:
# Checkout repository (and submodules)
- name: Checkout repository (and submodules)
uses: actions/checkout@v4
with:
submodules: recursive
# Install Qt (iOS & desktop)
- name: Install Qt (iOS & desktop)
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
host: 'mac'
target: 'ios'
extra: '--autodesktop'
# Setup env
- name: Setup env
run: |
qmake --version
# Build application
- name: Build application
run: |
qmake ${{env.APP_NAME}}.pro CONFIG+=release
make -j`sysctl -n hw.logicalcpu`