Skip to content

CI: macOS build

CI: macOS build #38

Workflow file for this run

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/*