chore: update the building script #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 CMAKE_MAKE_PROGRAM=${{ github.workspace }}\resources\tools\ninja.exe | |
set JAVA_HOME=%JAVA_HOME_11_X64% | |
${{ github.workspace }}\Qt\${{env.QT_VERSION}}\android_armv7\bin\qt-cmake.bat ^ | |
-G Ninja ^ | |
-S . ^ | |
-B "build\armeabi_v7a" ^ | |
-DQT_HOST_PATH:PATH="${{ github.workspace }}\Qt\${{env.QT_VERSION}}\win64_mingw" ^ | |
-DCMAKE_BUILD_TYPE:STRING=Release ^ | |
-CMAKE_MAKE_PROGRAM:FILEPATH="${{ github.workspace }}\resources\tools\ninja.exe" ^ | |
-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%" |