Skip to content

Commit

Permalink
Add CI script for Windows MSVC build
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Apr 14, 2024
1 parent 64b8154 commit 8e97625
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
File renamed without changes.
72 changes: 72 additions & 0 deletions .github/workflows/build-windows-msvc.yml
Original file line number Diff line number Diff line change
@@ -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/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/README/README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -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调试。
Expand Down

0 comments on commit 8e97625

Please sign in to comment.