-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (41 loc) · 1.38 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]
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
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
qt5-static:p bison: flex:
- name: Build
run: |
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} -DCMAKE_PREFIX_PATH="${MINGW_PREFIX}/qt5-static" -G Ninja
cmake --build . -j
cd ..
- name: Prepare for package
continue-on-error: true
run: |
mkdir package_workspace && cd package_workspace
cp ../build/thplayer.exe ./
strip -s ./thplayer.exe
# windeployqt -winextras --no-quick-import --no-translations --no-opengl-sw --no-angle --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@v3
with:
name: msys2-mingw-w64-x86_64-windows
path: package_workspace/*