Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Feb 1, 2024
2 parents 294a289 + 3da3490 commit 4e9a3ce
Show file tree
Hide file tree
Showing 25 changed files with 208 additions and 1,101 deletions.
51 changes: 15 additions & 36 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,29 @@ jobs:
strategy:
matrix:
BUILD_TYPE: [Release]
qt_arch: [android_arm64_v8a, android_armv7, android_x86_64, android_x86]
qt_arch: [android_arm64_v8a, android_x86_64]
qt_version: [6.6.1]
include:
- BUILD_TYPE: Release
qt_arch: android_arm64_v8a
VCPKG_TARGET_TRIPLET: arm-android

- BUILD_TYPE: Release
qt_arch: android_armv7
VCPKG_TARGET_TRIPLET: arm-android
VCPKG_TARGET_TRIPLET: arm64-android

- BUILD_TYPE: Release
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:
artifact_name: build_android
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}_${{matrix.qt_arch}}
INSTALL_DIR: ${{github.workspace}}/.cache/install
SerialPortAssistant_VERSION: v0.5.16
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
ANDROID_PLATFORM: android-23
ANDROID_NATIVE_API_LEVEL: 23
qt_modules: qtscxml qtserialport qtwebview
qt_modules: 'qtscxml qtserialport qtwebchannel qtwebsockets qtwebview'

# Map the job outputs to step outputs
outputs:
Expand All @@ -68,32 +60,25 @@ jobs:
with:
path: |
${{env.INSTALL_DIR}}
key: cache-installed-android-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}

- name: Cache Qt
#if: false
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}_${{matrix.qt_arch}}
key: installed-qt${{matrix.qt_version}}-${{matrix.qt_arch}}-${{matrix.VCPKG_TARGET_TRIPLET}}

- name: Install Qt of gcc_64
uses: jurplel/install-qt-action@v3
with:
dir: '${{env.TOOSL_DIR}}/qt' # optional
dir: '${{env.TOOSL_DIR}}' # optional
version: '${{matrix.qt_version}}'
#host: 'linux'
target: 'desktop'
arch: 'gcc_64'
set-env: false
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false
cache: true
cache-key-prefix: install-qt-action

- name: Install Qt of android
uses: jurplel/install-qt-action@v3
with:
# Directory to install Qt
dir: '${{env.TOOSL_DIR}}/qt' # optional
dir: '${{env.TOOSL_DIR}}' # optional
# Version of Qt to install
version: '${{matrix.qt_version}}'
# Host platform
Expand All @@ -104,23 +89,18 @@ jobs:
arch: '${{matrix.qt_arch}}' # optional
# Additional Qt modules to install
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false
# Whether or not to actually download Qt
cache: true
cache-key-prefix: install-qt-action

- name: run-vcpkg
if: false
uses: lukka/[email protected]
- name: run vcpkg
uses: lukka/run-vcpkg@v11
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.
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
additionalCachedPaths: $VCPKG_ROOT/installed
vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}'
vcpkgArguments: 'openssl'

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand All @@ -131,7 +111,6 @@ jobs:
working-directory: ${{github.workspace}}/build
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
QT_ROOT: ${{env.Qt5_DIR}}
QT_ANDROID_KEYSTORE_PATH: ${{env.SOURCE_DIR}}/RabbitCommon/RabbitCommon.keystore
QT_ANDROID_KEYSTORE_ALIAS: rabbitcommon
QT_ANDROID_KEYSTORE_STORE_PASS: ${{secrets.STOREPASS}}
Expand Down
53 changes: 19 additions & 34 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug]
qt_version: [6.5.2, 5.15.2, 5.12.12]
qt_version: [6.6.1, 5.15.2, 5.12.12]
qt_arch: [clang_64]
VCPKG_TARGET_TRIPLET: [x64-osx]
include:
- qt_version: 6.5.2
qt_modules: qtscxml qtserialport qtwebchannel qtwebengine qtpositioning
- qt_version: 6.6.1
qt_modules: qtscxml qtmultimedia qtwebchannel qtwebsockets qtwebview qtserialport

- qt_version: 5.15.2
qt_modules: ""

- qt_version: 5.12.12
qt_modules: ""

runs-on: macos-latest

Expand All @@ -37,7 +37,7 @@ jobs:
qt_modules: qtwebengine ${{matrix.qt_modules}}
SerialPortAssistant_VERSION: v1.0.9
artifact_name: build_macos
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6

# Map the job outputs to step outputs
outputs:
Expand All @@ -62,40 +62,23 @@ jobs:
with:
path: |
${{env.INSTALL_DIR}}
key: Cache-macos-installed-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}
key: Cache-installed-macos_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}

- name: run-vcpkg
uses: lukka/run-vcpkg@v7.4
- name: run vcpkg
uses: lukka/run-vcpkg@v11
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.
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: RabbitCommon_cache-vcpkg-msvc-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
#additionalCachedPaths: ${{ env.VCPKG_ROOT }}/installed
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}_macos

- name: Install Qt
# You may pin to the exact commit or the version.
# uses: jurplel/install-qt-action@a962fb91949c8e846a3e4a944d50e7ef5cc3a28a
uses: jurplel/install-qt-action@v3
with:
# Directory to install Qt
dir: ${{env.TOOSL_DIR}}/qt # optional
# Version of Qt to install
version: ${{matrix.qt_version}} # optional, default is 5.15.2
modules: ${{env.qt_modules}} # optional, see: https://ddalcino.github.io/aqt-list-server/
dir: '${{env.TOOSL_DIR}}/qt' # optional
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
arch: '${{matrix.qt_arch}}' # optional
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cache: true
cache-key-prefix: install-qt-action

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand All @@ -106,15 +89,17 @@ jobs:
working-directory: ${{github.workspace}}/build
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
PKG_CONFIG_PATH: ${{env.INSTALL_DIR}}/lib/pkgconfig
run: |
cmake ${{github.workspace}} \
-DCMARK_SHARED=OFF \
-DCMARK_TESTS=OFF \
-DCMARK_STATIC=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake \
-DVCPKG_VERBOSE=ON \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
7z a SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos.zip install/.
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
defaults:
run:
shell: cmd

runs-on: windows-latest

env:
Expand All @@ -45,7 +45,7 @@ jobs:
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
cmake -E make_directory ${{github.workspace}}/build
- name: pacman
env:
PATH: C:\msys64\usr\bin
Expand Down Expand Up @@ -83,10 +83,16 @@ jobs:
PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
PKG_CONFIG_PATH: ${{env.INSTALL_DIR}}/lib/pkgconfig
run: |
qmake ${{github.workspace}}\SerialPortAssistant.pro CONFIG*=${{matrix.BUILD_TYPE}} RabbitCommon_DIR=${{env.RabbitCommon_DIR}} prefix=${{github.workspace}}\build\install
make install
move /Y install\plugins\*crypto*.dll install\bin
move /Y install\plugins\*ssl*.dll install\bin
cmake .. -G"MinGW Makefiles" ^
-DCMARK_SHARED=OFF ^
-DCMARK_TESTS=OFF ^
-DCMARK_STATIC=ON ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install ^
-DBUILD_FREERDP=ON ^
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}
cmake --build . --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
copy /Y C:\msys64\mingw64\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
Expand Down
95 changes: 20 additions & 75 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
qt_version: [6.6.1, 5.15.2, 5.12.12]
include:
- qt_version: 6.6.1
triplet: x64-windows
VCPKG_TARGET_TRIPLET: x64-windows
VCPKG_PLATFORM_TOOLSET: v142
qt_arch: win64_msvc2019_64
CMAKE_GENERATOR_PLATFORM: x64
qt_modules: qtscxml qtserialport qtwebchannel qtwebsockets qtwebview qtpositioning

- qt_version: 5.15.2
triplet: x64-windows
VCPKG_TARGET_TRIPLET: x64-windows
VCPKG_PLATFORM_TOOLSET: v142
qt_arch: win64_msvc2019_64
CMAKE_GENERATOR_PLATFORM: x64

- qt_version: 5.12.12
triplet: x86-windows
VCPKG_TARGET_TRIPLET: x86-windows
VCPKG_PLATFORM_TOOLSET: v141
qt_arch: win32_msvc2017
CMAKE_GENERATOR_PLATFORM: Win32
Expand All @@ -43,7 +43,7 @@ jobs:
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
SerialPortAssistant_VERSION: v0.5.16
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
qt_modules: qtwebengine ${{matrix.qt_modules}}
artifact_name: build_msvc

Expand All @@ -67,91 +67,36 @@ jobs:
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}_${{matrix.qt_arch}}

- name: Install Qt
# You may pin to the exact commit or the version.
# uses: jurplel/install-qt-action@a962fb91949c8e846a3e4a944d50e7ef5cc3a28a
uses: jurplel/[email protected]
- name: Cache installed
uses: actions/cache@v3
id: cache-installed
with:
# Directory to install Qt
dir: ${{env.TOOSL_DIR}}/qt # optional
# Version of Qt to install
version: ${{matrix.qt_version}} # optional, default is 5.15.2
# Host platform
#host: linux # optional
# Target platform for build
#target: desktop # optional, default is desktop
# Architecture for Windows/Android
arch: ${{matrix.qt_arch}} # optional
# Whether or not to install Qt dependencies on Linux
#install-deps: true # optional, default is true
# Additional Qt modules to install
modules: ${{env.qt_modules}} # optional. see: https://ddalcino.github.io/aqt-list-server/
# Force a Qt mirror in case the default is not working
#mirror: # optional
# Whether or not to actually download Qt
cached: ${{ steps.cache-qt.outputs.cache-hit }} # optional, default is false
# Whether or not to automatically run setup-python to find a valid python version.
#setup-python: false # optional, default is true
# Qt tools to download--specify comma-separated argument lists which are themselves separated by spaces: <tool_name>,<tool_version>,<tool_arch>
#tools: # optional
# Whether or not to actually install Qt or just the tools from the tools argument
#tools-only: false # optional, default is false
# Version of aqtinstall to use in case of issues
#aqtversion: # optional, default is ==0.10.0
# Version of py7zr to use in case of issues
#py7zrversion: # optional, default is ==0.11.0
# Any extra arguments to append to the back
#extra: # optional
path: |
${{env.INSTALL_DIR}}
key: cache-installed-msvc-${{ matrix.qt_arch}}

- name: run-vcpkg
uses: lukka/run-vcpkg@v7.4
uses: lukka/run-vcpkg@v11
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.
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: RabbitCommon_cache-vcpkg-msvc-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
#additionalCachedPaths: ${{ env.VCPKG_ROOT }}/installed
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl'

- name: Cache installed
uses: actions/cache@v3
id: cache-installed
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
path: |
${{env.INSTALL_DIR}}
key: msvc_cache-installed-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}
dir: '${{env.TOOSL_DIR}}/qt' # optional
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
arch: '${{matrix.qt_arch}}' # optional
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cache: true
cache-key-prefix: install-qt-action

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: |
git clone https://github.com/KangLin/RabbitCommon.git
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: ${{ matrix.CMAKE_GENERATOR_PLATFORM }}
# vsversion: ${{ matrix.vc_version }}

# - name: Setup Visual Studio Tools
# uses: egor-tensin/vs-shell@v2
# with:
# arch: ${{ matrix.CMAKE_GENERATOR_PLATFORM }}

# - name: Install jom
# run: choco install jom

- name: build SerialPortAssistant
working-directory: ${{github.workspace}}/build
env:
Expand Down
Loading

0 comments on commit 4e9a3ce

Please sign in to comment.