Skip to content

Commit a7e5910

Browse files
committed
test MinGW64 build
Signed-off-by: Martin <[email protected]>
1 parent d4115b4 commit a7e5910

File tree

2 files changed

+74
-72
lines changed

2 files changed

+74
-72
lines changed

.github/workflows/build.yml

Lines changed: 73 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -263,78 +263,79 @@ jobs:
263263
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
264264

265265

266-
# # ---------------------------
267-
# # --- Windows MINGW steps ---
268-
# # ---------------------------
269-
# #
270-
# windows-mingw_w64:
271-
# runs-on: windows-2022
272-
# steps:
273-
274-
# # --- Clone the latest commit ---
275-
# - name: Checkout
276-
# uses: actions/checkout@v3
277-
# with:
278-
# fetch-tags: true
279-
# submodules: recursive
280-
# fetch-depth: 0
281-
282-
# # --- Config git and get the version from "git describe" ---
283-
# - name: Config Git
284-
# id: config_git
285-
# shell: bash
286-
# run: |
287-
# git config user.email "[email protected]"
288-
# git config user.name "Ho-Ro"
289-
# git fetch --tags --force || true
290-
# git submodule update --init --recursive
291-
# echo "git_describe=$(git describe)"
292-
# echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT
293-
294-
# - name: Install MSYS2 Packages
295-
# uses: msys2/setup-msys2@v2
296-
# with:
297-
# update: true
298-
# install: >-
299-
# mingw-w64-x86_64-cmake
300-
# mingw-w64-x86_64-gcc
301-
# mingw-w64-x86_64-qt6-static
302-
# mingw-w64-x86_64-fftw
303-
# mingw-w64-x86_64-libusb
304-
305-
# - name: Start Windows Build
306-
# shell: msys2 {0}
307-
# run: |
308-
# cmake -D CMAKE_PREFIX_PATH=/mingw64/qt6-static -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build
309-
# cmake --build build --parallel 8 --target package
310-
311-
# - name: Create Windows Package
312-
# # GitHub hosts Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure:
313-
# # 2-core CPU, 7 GB of RAM memory, 14 GB of SSD disk space
314-
# working-directory: ${{github.workspace}}/build
315-
# shell: bash
316-
# run: |
317-
# # this ZIP package contains only OpenHantek.exe, just get the name
318-
# ZIP=$(basename packages/openhantek_*_mingw_x64.zip)
319-
# rm -f packages/openhantek_*_mingw_x64.*
320-
# cd openhantek
321-
# 7z a ../packages/$ZIP *.exe driver documents
322-
# ls -l ../packages
323-
324-
# - name: Upload Windows Artifacts
325-
# uses: actions/upload-artifact@v4
326-
# with:
327-
# name: openhantek_${{ steps.config_git.outputs.git_describe }}_mingw_x64
328-
# path: ./build/packages/*.zip
329-
330-
# - name: Upload Windows Release Assets
331-
# if: startsWith(github.ref, 'refs/tags/')
332-
# uses: softprops/action-gh-release@v1
333-
# with:
334-
# prerelease: true
335-
# files: ./build/packages/*
336-
# env:
337-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
266+
# ---------------------------
267+
# --- Windows MINGW steps ---
268+
# ---------------------------
269+
#
270+
windows-mingw_w64:
271+
runs-on: windows-2022
272+
steps:
273+
274+
# --- Clone the latest commit ---
275+
- name: Checkout
276+
uses: actions/checkout@v3
277+
with:
278+
fetch-tags: true
279+
submodules: recursive
280+
fetch-depth: 0
281+
282+
# --- Config git and get the version from "git describe" ---
283+
- name: Config Git
284+
id: config_git
285+
shell: bash
286+
run: |
287+
git config user.email "[email protected]"
288+
git config user.name "Ho-Ro"
289+
git fetch --tags --force || true
290+
git submodule update --init --recursive
291+
echo "git_describe=$(git describe)"
292+
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT
293+
294+
- name: Install MSYS2 Packages
295+
uses: msys2/setup-msys2@v2
296+
with:
297+
update: true
298+
install: >-
299+
mingw-w64-x86_64-cmake
300+
mingw-w64-x86_64-gcc
301+
mingw-w64-x86_64-qt6-static
302+
mingw-w64-x86_64-pcre2
303+
mingw-w64-x86_64-fftw
304+
mingw-w64-x86_64-libusb
305+
306+
- name: Start Windows Build
307+
shell: msys2 {0}
308+
run: |
309+
cmake -D CMAKE_PREFIX_PATH=/mingw64/qt6-static -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build
310+
cmake --build build --parallel 8 --target package
311+
312+
- name: Create Windows Package
313+
# GitHub hosts Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure:
314+
# 2-core CPU, 7 GB of RAM memory, 14 GB of SSD disk space
315+
working-directory: ${{github.workspace}}/build
316+
shell: bash
317+
run: |
318+
# this ZIP package contains only OpenHantek.exe, just get the name
319+
ZIP=$(basename packages/openhantek_*_mingw_x64.zip)
320+
rm -f packages/openhantek_*_mingw_x64.*
321+
cd openhantek
322+
7z a ../packages/$ZIP *.exe driver documents
323+
ls -l ../packages
324+
325+
- name: Upload Windows Artifacts
326+
uses: actions/upload-artifact@v4
327+
with:
328+
name: openhantek_${{ steps.config_git.outputs.git_describe }}_mingw_x64
329+
path: ./build/packages/*.zip
330+
331+
- name: Upload Windows Release Assets
332+
if: startsWith(github.ref, 'refs/tags/')
333+
uses: softprops/action-gh-release@v1
334+
with:
335+
prerelease: true
336+
files: ./build/packages/*
337+
env:
338+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
338339

339340

340341
# --------------------------

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
2025-09-01 (d4115b4): test Win MSVC build action
12
2025-08-30 (c2a6ef1): Fix GitHub runner Linux build – Temporarily disable Windows build
23
2025-08-30 (a591a6e): update GitHub runner CI/CD script, update docs
34
2025-08-30 (05ec4ee): Qt5 -> Qt6 transition

0 commit comments

Comments
 (0)