Skip to content

[DOCS] Factorize configuration (#94) #161

[DOCS] Factorize configuration (#94)

[DOCS] Factorize configuration (#94) #161

Workflow file for this run

#-------------------------------------------------------------------------------
# Workflow configuration
#-------------------------------------------------------------------------------
name: "Mobile CI builds"
on:
push:
pull_request:
workflow_dispatch:
#-------------------------------------------------------------------------------
# Define application name & version
#-------------------------------------------------------------------------------
env:
VERSION: "1.3"
APPLICATION: "Theengs"
QMAKE_PROJECT: "Theengs.pro"
QT_VERSION: "6.4.3"
#-------------------------------------------------------------------------------
# Workflow jobs
#-------------------------------------------------------------------------------
jobs:
## Android build #############################################################
build-android:
name: "Android CI build"
runs-on: ubuntu-20.04
steps:
# Checkout the repository
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
# Java environment (already installed in 'ubuntu-20.04')
#- name: Install JDK environment
# uses: actions/setup-java@v2
# with:
# distribution: 'zulu'
# java-version: '11'
# Android environment (already installed in 'ubuntu-20.04')
#- name: Setup Android SDK
# uses: android-actions/setup-android@v2
#- name: Install Android SDK / NDK / tools
# run: |
# sdkmanager "platforms;android-32"
# sdkmanager "ndk;23.1.7779620"
# sdkmanager "build-tools;30.0.3"
# Install Qt (Android & desktop)
- name: Install Qt (Android & desktop)
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
host: 'linux'
target: 'android'
arch: 'android_arm64_v8a'
modules: qtconnectivity qtwebsockets qtcharts qtshadertools qt5compat
aqtversion: '==3.1.*'
py7zrversion: '==0.20.*'
extra: '--autodesktop'
# Setup env
- name: Setup env
run: |
sudo apt-get install cmake ninja-build libtool automake m4 gettext -y
export PATH=$Qt6_DIR/bin:$PATH
qmake --version
ninja --version
# Build dependencies (from contribs script)
- name: Build dependencies (from contribs script)
run: |
cd contribs/
python3 contribs_builder.py --qt-directory ${{env.Qt6_DIR}}/../.. --qt-version ${{env.QT_VERSION}} --targets=android_armv8
cd ..
# Build application
- name: Build application
run: |
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release DEFINES+=QT_CONNECTIVITY_PATCHED
make -j$(nproc)
## iOS build #################################################################
build-ios:
name: "iOS CI build"
runs-on: macos-11
steps:
# Checkout the repository
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
# Install Qt (iOS & desktop)
- name: Install Qt (iOS & desktop)
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
host: 'mac'
target: 'ios'
modules: qtconnectivity qtwebsockets qtcharts qtshadertools qt5compat
aqtversion: '==3.1.*'
py7zrversion: '==0.20.*'
extra: '--autodesktop'
# Setup env
- name: Setup env
run: |
brew install cmake ninja automake autoconf libtool pkg-config
export PATH=$Qt6_DIR/bin:$PATH
qmake --version
# Build dependencies (from contribs script)
- name: Build dependencies (from contribs script)
run: |
cd contribs/
python3 contribs_builder.py --qt-directory ${{env.Qt6_DIR}}/../.. --qt-version ${{env.QT_VERSION}} --targets=ios_armv8
cd ..
# Build application
- name: Build application
run: |
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
make -j$(nproc)