diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows-mingw.yml similarity index 100% rename from .github/workflows/build-windows.yml rename to .github/workflows/build-windows-mingw.yml diff --git a/.github/workflows/build-windows-msvc.yml b/.github/workflows/build-windows-msvc.yml new file mode 100644 index 0000000..04f5763 --- /dev/null +++ b/.github/workflows/build-windows-msvc.yml @@ -0,0 +1,72 @@ +name: Windows CI (MSVC) + +on: [ workflow_dispatch, push ] + +defaults: + run: + shell: pwsh + +jobs: + build: + strategy: + fail-fast: false + matrix: + arch: [ win64, win32 ] + runs-on: windows-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-tags: true + + - name: Detect Qt Arch + id: detect-qt-arch + run: | + $BUILD_ARCH="${{ matrix.arch }}" + switch ($BUILD_ARCH) { + "win64" { $QT_ARCH = "win64_msvc2019_64" } + "win32" { $QT_ARCH = "win32_msvc2019" } + } + echo $QT_ARCH + echo "QT_ARCH=$QT_ARCH" >> $env:GITHUB_ENV + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: '5.15.2' + target: 'desktop' + arch: ${{ env.QT_ARCH }} + cache: true + + - name: Set up Visual Studio shell + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + toolset: '14.2' + + - name: Download QCustomPlot + run: | + Invoke-WebRequest -Uri "https://www.qcustomplot.com/release/2.1.1/QCustomPlot-source.tar.gz" -OutFile "QCustomPlot-source.tar.gz" + tar -xvzf QCustomPlot-source.tar.gz + Copy-Item -Path "qcustomplot-source/qcustomplot.*" -Destination "./src" + + - name: Build + shell: cmd + run: | + qmake -r ./src/SerialTest.pro -spec win32-msvc + nmake -f Makefile.Release + nmake clean + + - name: Copy DLLs + run: | + cd ./release + windeployqt ./SerialTest.exe + python ../pack/find_dlls.py ./SerialTest.exe + dir + + - name: Save artifact + uses: actions/upload-artifact@v4 + with: + name: SerialTest-${{ matrix.arch }} + path: ./release/* diff --git a/README.md b/README.md index f0ac497..d1e8d00 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SerialTest [![downloads](https://img.shields.io/github/downloads/wh201906/SerialTest/total?label=GitHub%20release%20downloads)](https://github.com/wh201906/SerialTest/releases) [![downloads](https://img.shields.io/sourceforge/dt/serialtest.svg?label=SourceForge%20downloads)](https://sourceforge.net/projects/serialtest/) [![installs](https://img.shields.io/flathub/downloads/io.github.wh201906.serialtest?label=Flathub%20installs)](https://flathub.org/apps/io.github.wh201906.serialtest) [![translation](https://hosted.weblate.org/widgets/serialtest/-/svg-badge.svg)](https://hosted.weblate.org/engage/serialtest/) -[![Windows CI(MinGW-w64)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows.yml) [![macOS CI](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml) +[![Windows CI(MinGW-w64)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-mingw.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-mingw.yml) [![Windows CI(MSVC)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-msvc.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-msvc.yml) [![macOS CI](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml) A versatile test tool running on Windows/Linux/macOS/Android. Works as data transceiver/realtime plotter/shortcut/file transceiver. Supports serial port, Bluetooth SPP client/server, Bluetooth LE client, TCP client/server, UDP. diff --git a/doc/README/README_zh_CN.md b/doc/README/README_zh_CN.md index 231e54b..55e6d95 100644 --- a/doc/README/README_zh_CN.md +++ b/doc/README/README_zh_CN.md @@ -1,6 +1,6 @@ # SerialTest [![downloads](https://img.shields.io/github/downloads/wh201906/SerialTest/total?label=GitHub%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://github.com/wh201906/SerialTest/releases) [![downloads](https://img.shields.io/sourceforge/dt/serialtest.svg?label=SourceForge%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://sourceforge.net/projects/serialtest/) [![installs](https://img.shields.io/flathub/downloads/io.github.wh201906.serialtest?label=Flathub%E5%AE%89%E8%A3%85%E9%87%8F)](https://flathub.org/apps/io.github.wh201906.serialtest) [![translation](https://hosted.weblate.org/widgets/serialtest/-/svg-badge.svg)](https://hosted.weblate.org/engage/serialtest/) -[![Windows CI(MinGW-w64)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows.yml) [![macOS CI](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml) +[![Windows CI(MinGW-w64)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-mingw.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-mingw.yml) [![Windows CI(MSVC)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-msvc.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-windows-msvc.yml) [![macOS CI](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml/badge.svg)](https://github.com/wh201906/SerialTest/actions/workflows/build-macos.yml) 可在Windows/Linux/macOS/Android上运行,功能丰富的调试工具。 支持数据收发/实时绘图/快捷方式/文件收发功能。 支持串口/蓝牙SPP客户端/蓝牙SPP服务器/蓝牙BLE客户端/TCP客户端/TCP服务器/UDP调试。