-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (41 loc) · 1.5 KB
/
windows-msys2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Windows MSYS2 Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
pacboy: >-
toolchain:p ninja:p cmake:p extra-cmake-modules:p icoutils:p
qt6:p icu:p bison: flex:
- name: Build
run: |
# for static build we will need -DCMAKE_PREFIX_PATH="${MINGW_PREFIX}/qt6-static"
# but MSYS2's static Qt 6 is problematic currently: https://github.com/msys2/MINGW-packages/issues/18966
cmake . -B build -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} -G Ninja
cmake --build build -j
- name: Prepare for package
continue-on-error: true
run: |
mkdir package_workspace && cd package_workspace
cp ../build/thplayer.exe ./
strip -s ./thplayer.exe
windeployqt6 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler ./thplayer.exe
ldd ./thplayer.exe > deps.txt
bash -c 'while read -r line; do path=$(cut -d" " -f3 <<<$line); cp -v $path ./; done <<<$(grep ".*mingw.*bin" deps.txt); exit 0'
rm deps.txt
# done
cd ../
- uses: actions/upload-artifact@v4
with:
name: msys2-mingw-w64-x86_64-windows
path: package_workspace/*