Skip to content

chore: update the building script #121

chore: update the building script

chore: update the building script #121

Workflow file for this run

name: build-android
on: push
# schedule:
# - cron: '0 0 * * *'
env:
QT_VERSION: 6.5.3
QT_MODULES: 'qtcharts qtserialbus qtserialport qtwebsockets'
jobs:
build:
name: Build
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt for Android
uses: jurplel/install-qt-action@v3
with:
target: android
arch: android_armv7
host: windows
dir: ${{ github.workspace }}
modules: ${{env.QT_MODULES}}
version: ${{env.QT_VERSION}}
- name: Install Qt for Desktop(mingw)
uses: jurplel/install-qt-action@v3
with:
target: desktop
arch: win64_mingw
host: windows
dir: ${{ github.workspace }}
modules: ${{env.QT_MODULES}}
version: "${{env.QT_VERSION}}"
- name: Build for Android
shell: cmd
run: |
set JAVA_HOME=%JAVA_HOME_11_X64%
set QT_HOST_PATH="${{ github.workspace }}\Qt\${{env.QT_VERSION}}\win64_mingw"
${{ github.workspace }}\Qt\${{env.QT_VERSION}}\android_armv7\bin\qt-cmake.bat -G "MinGW Makefiles" -S . -B "build\armeabi_v7a" -DQT_HOST_PATH:PATH="${{ github.workspace }}\Qt\${{env.QT_VERSION}}\win64_mingw" -DJAVA_HOME=%JAVA_HOME_11_X64% -DQT_HOST_PATH:PATH="${{ github.workspace }}\Qt\${{env.QT_VERSION}}\win64_mingw" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER:FILEPATH="%ANDROID_NDK_ROOT%/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -DANDROID_SDK_ROOT:PATH="%ANDROID_SDK_ROOT%" -DANDROID_NDK_ROOT:PATH="%ANDROID_NDK_ROOT%"