Fix 95df7ea: Incorrect WindowClasses for deduplicated window descs. (#13412)
[openttd-github.git] / .github / workflows / ci-mingw.yml
blobb1079a534ca01bc0e291eb578747a4abaa9a79c3
1 name: CI (MinGW)
3 on:
4   workflow_call:
5     inputs:
6       arch:
7         required: true
8         type: string
9       msystem:
10         required: true
11         type: string
13 env:
14   CTEST_OUTPUT_ON_FAILURE: 1
16 jobs:
17   mingw:
18     name: CI
20     runs-on: windows-latest
22     steps:
23     - name: Checkout
24       uses: actions/checkout@v4
26     - name: Setup MSYS2
27       uses: msys2/setup-msys2@v2
28       with:
29         msystem: ${{ inputs.msystem }}
30         release: false
31         install: >-
32           git
33           make
34           mingw-w64-${{ inputs.arch }}-cmake
35           mingw-w64-${{ inputs.arch }}-gcc
36           mingw-w64-${{ inputs.arch }}-lzo2
37           mingw-w64-${{ inputs.arch }}-libpng
38           mingw-w64-${{ inputs.arch }}-lld
39           mingw-w64-${{ inputs.arch }}-ninja
40           mingw-w64-${{ inputs.arch }}-libogg
41           mingw-w64-${{ inputs.arch }}-opus
42           mingw-w64-${{ inputs.arch }}-opusfile
44     - name: Install OpenGFX
45       shell: bash
46       run: |
47         mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
48         cd "C:/Users/Public/Documents/OpenTTD/baseset"
50         echo "::group::Download OpenGFX"
51         curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
52         echo "::endgroup::"
54         echo "::group::Unpack OpenGFX"
55         unzip opengfx-all.zip
56         echo "::endgroup::"
58         rm -f opengfx-all.zip
60     - name: Install GCC problem matcher
61       uses: ammaraskar/gcc-problem-matcher@master
63     - name: Build
64       shell: msys2 {0}
65       env:
66         NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
67       run: |
68         mkdir build
69         cd build
71         echo "::group::CMake"
72         cmake .. \
73           -GNinja \
74           -DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
75           # EOF
76         echo "::endgroup::"
78         echo "::group::Build"
79         cmake --build .
80         echo "::endgroup::"
82     - name: Test
83       shell: msys2 {0}
84       run: |
85         cd build
86         ctest --timeout 120