aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/windows-msys2.yml
blob: 40e93173aff50a00bc3128e5085c7060a2015104 (plain) (blame)
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
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
      - uses: msys2/setup-msys2@v2
        with:
          msystem: UCRT64
          update: true
          pacboy: >-
            toolchain:p ninja:p cmake:p
            qt6:p opencv:p sqlite3:p
      - name: Build deduper
        run: |
          mkdir build && cd build
          cmake .. -G Ninja -DQDEDUPER_USE_QT6=ON
          cmake --build . -j
          cd ..
      - name: Prepare for package
        continue-on-error: true
        run: |
          mkdir package_workspace && cd package_workspace
          cp ../build/qdeduper/qdeduper.exe ./
          strip -S ./qdeduper.exe
          windeployqt6 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler ./qdeduper.exe
          ldd ./qdeduper.exe > deps-qdeduper.txt
          bash -c 'while read -r line; do path=$(cut -d" " -f3 <<<$line); cp -v $path ./; done <<<$(grep ".*ucrt.*bin" deps-qdeduper.txt); exit 0'
          rm deps-qdeduper.txt
          # done
          cd ../
      - uses: actions/upload-artifact@v4
        with:
          name: mingw-w64-ucrt-x86_64-windows
          path: package_workspace/*