-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
18,356 additions
and
313 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ jobs: | |
strategy: | ||
matrix: | ||
BUILD_TYPE: [Release] | ||
qt_arch: [android_arm64_v8a, android_armv7, android_x86_64] | ||
qt_version: [5.12.12] | ||
qt_arch: [android_arm64_v8a, android_armv7, android_x86_64, android_x86] | ||
qt_version: [6.6.0] | ||
include: | ||
- BUILD_TYPE: Release | ||
qt_arch: android_arm64_v8a | ||
|
@@ -27,6 +27,10 @@ jobs: | |
qt_arch: android_x86_64 | ||
VCPKG_TARGET_TRIPLET: x64-android | ||
|
||
- BUILD_TYPE: Release | ||
qt_arch: android_x86 | ||
VCPKG_TARGET_TRIPLET: x32-android | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
|
@@ -35,10 +39,10 @@ jobs: | |
TOOSL_DIR: ${{github.workspace}}/.cache/tools | ||
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}_${{matrix.qt_arch}} | ||
SerialPortAssistant_VERSION: v0.5.14 | ||
VCPKGGITCOMMITID: 1286cac8751e13bb289061b7e3b89eb4c3f613a2 | ||
VCPKGGITCOMMITID: 2f6176ce98fee807a207dc9e8fec213f111c291b | ||
ANDROID_PLATFORM: android-23 | ||
ANDROID_NATIVE_API_LEVEL: 23 | ||
qt_modules: qtwebengine | ||
qt_modules: qtscxml qtserialport qtwebview | ||
|
||
# Map the job outputs to step outputs | ||
outputs: | ||
|
@@ -103,6 +107,7 @@ jobs: | |
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false | ||
|
||
- name: run-vcpkg | ||
if: false | ||
uses: lukka/[email protected] | ||
with: | ||
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. | ||
|
@@ -121,19 +126,30 @@ jobs: | |
working-directory: ${{env.SOURCE_DIR}} | ||
run: | | ||
git clone https://github.com/KangLin/RabbitCommon.git | ||
- name: build SerialPortAssistant | ||
working-directory: ${{github.workspace}}/build | ||
env: | ||
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon | ||
QT_ROOT: ${{env.Qt5_DIR}} | ||
run: | | ||
${QT_ROOT}/bin/qmake ${{github.workspace}} \ | ||
"CONFIG+=${{matrix.BUILD_TYPE}}" | ||
make | ||
make install INSTALL_ROOT=`pwd`/android-build | ||
sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake | ||
${Qt6_DIR}/bin/qt-cmake .. \ | ||
-DCMARK_SHARED=OFF \ | ||
-DCMARK_TESTS=OFF \ | ||
-DCMARK_STATIC=ON \ | ||
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ | ||
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \ | ||
-DANDROID_PLATFORM=${{env.ANDROID_PLATFORM}} \ | ||
-DANDROID_NATIVE_API_LEVEL=${{env.ANDROID_NATIVE_API_LEVEL}} \ | ||
-DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \ | ||
-DCMAKE_INSTALL_PREFIX=`pwd`/install | ||
cmake --build . --config ${{matrix.BUILD_TYPE}} --target all | ||
APK_FILE=`find . -name "android-*.apk"` | ||
cp $APK_FILE SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk | ||
- name: Package | ||
if: ${{matrix.BUILD_TYPE == 'Release'}} | ||
if: false | ||
env: | ||
QT_ROOT: ${{env.Qt5_DIR}} | ||
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon | ||
|
@@ -165,20 +181,6 @@ jobs: | |
if: ${{ matrix.BUILD_TYPE == 'Release' }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: SerialPortAssistant_${{matrix.ANDROID_ABI}}_${{env.SerialPortAssistant_VERSION}}.apk | ||
name: ${{ env.artifact_name }} | ||
path: | | ||
${{github.workspace}}/SerialPortAssistant_${{matrix.ANDROID_ABI}}_${{env.SerialPortAssistant_VERSION}}.apk | ||
${{github.workspace}}/update_android_${{matrix.ANDROID_ABI}}.xml | ||
- name: Upload To Github Release | ||
if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }} | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
prerelease: true | ||
body: | | ||
[:cn: 修改日志](ChangeLog_zh_CN.md) [:us: Change log](ChangeLog.md) | ||
files: | | ||
${{github.workspace}}/SerialPortAssistant_${{matrix.ANDROID_ABI}}_${{env.SerialPortAssistant_VERSION}}.apk | ||
${{github.workspace}}/update_android_${{matrix.ANDROID_ABI}}.xml | ||
${{github.workspace}}/build/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Author: Kang Lin <[email protected]> | ||
|
||
project(SerialPortAssistant) | ||
|
||
set(HEADER_FILES | ||
MainWindow.h | ||
Global/Global.h | ||
Common/Tool.h | ||
SendFile.h | ||
${CMAKE_SOURCE_DIR}/3th_lib/Control/lightbutton.h | ||
) | ||
set(SOURCE_FILES | ||
MainWindow.cpp | ||
Main.cpp | ||
Global/Global.cpp | ||
Common/Tool.cpp | ||
SendFile.cpp | ||
${CMAKE_SOURCE_DIR}/3th_lib/Control/lightbutton.cpp | ||
) | ||
set(SOURCE_UI_FILES | ||
MainWindow.ui | ||
) | ||
set(RESOURCE_FILES Resource/Resource.qrc) | ||
if(WIN32) | ||
list(APPEND RESOURCE_FILES AppIcon.rc) | ||
endif() | ||
|
||
ADD_TARGET(NAME ${PROJECT_NAME} | ||
ISEXE | ||
ISWINDOWS | ||
SOURCE_FILES ${SOURCE_FILES} ${SOURCE_UI_FILES} ${HEADER_FILES} ${RESOURCE_FILES} | ||
INCLUDE_DIRS | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> # See: http://www.it1352.com/478094.html | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | ||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}> | ||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/3th_lib/Control> | ||
PRIVATE_LIBS RabbitCommon ${QT_LIBRARIES} | ||
PRIVATE_DEFINITIONS SerialPortAssistant_VERSION="${SerialPortAssistant_VERSION}" | ||
SerialPortAssistant_REVISION="${SerialPortAssistant_REVISION}" | ||
RABBITCOMMON | ||
VERSION ${SerialPortAssistant_VERSION} | ||
) |
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
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
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
Oops, something went wrong.