Debian Codegraph @

.github/workflows/windows.yml

raw symbols SCIP
1 name: Windows
2
3 on:
4 push:
5 branches:
6 - develop
7 - master
8 - release/*
9 pull_request:
10 workflow_dispatch:
11
12 permissions:
13 contents: read
14
15 concurrency:
16 group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
17 cancel-in-progress: true
18
19 jobs:
20 mingw:
21 runs-on: windows-2019
22 strategy:
23 matrix:
24 architecture: [x64, x86]
25
26 steps:
27 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28 - name: Set up MinGW
29 uses: egor-tensin/setup-mingw@84c781b557efd538dec66bde06988d81cd3138cf # v2.2.0
30 with:
31 platform: ${{ matrix.architecture }}
32 version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
33 - name: Run CMake
34 run: cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
35 - name: Build
36 run: cmake --build build --parallel 10
37 - name: Test
38 run: cd build ; ctest -j 10 -C Debug --output-on-failure
39
40 msvc2019:
41 runs-on: windows-2019
42 strategy:
43 matrix:
44 build_type: [Debug, Release]
45 architecture: [Win32, x64]
46
47 steps:
48 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49 - name: Run CMake
50 run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
51 if: matrix.build_type == 'Release'
52 - name: Run CMake
53 run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
54 if: matrix.build_type == 'Debug'
55 - name: Build
56 run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
57 - name: Test
58 run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
59
60 msvc2019_latest:
61 runs-on: windows-2019
62
63 steps:
64 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65 - name: Run CMake
66 run: cmake -S . -B build -G "Visual Studio 16 2019" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
67 - name: Build
68 run: cmake --build build --config Release --parallel 10
69 - name: Test
70 run: cd build ; ctest -j 10 -C Release --output-on-failure
71
72 msvc2022:
73 runs-on: windows-2022
74 strategy:
75 matrix:
76 build_type: [Debug, Release]
77 architecture: [Win32, x64]
78
79 steps:
80 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
81 - name: Run CMake
82 run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
83 if: matrix.build_type == 'Release'
84 - name: Run CMake
85 run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
86 if: matrix.build_type == 'Debug'
87 - name: Build
88 run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
89 - name: Test
90 run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
91
92 msvc2022_latest:
93 runs-on: windows-2022
94
95 steps:
96 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97 - name: Run CMake
98 run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
99 - name: Build
100 run: cmake --build build --config Release --parallel 10
101 - name: Test
102 run: cd build ; ctest -j 10 -C Release --output-on-failure
103
104 clang:
105 runs-on: windows-2019
106 strategy:
107 matrix:
108 version: [11, 12, 13, 14, 15]
109
110 steps:
111 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
112 - name: Install Clang
113 run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}.0.0/LLVM-${{ matrix.version }}.0.0-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
114 - name: Run CMake
115 run: cmake -S . -B build -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
116 - name: Build
117 run: cmake --build build --parallel 10
118 - name: Test
119 run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure
120
121 clang-cl-11:
122 runs-on: windows-2019
123 strategy:
124 matrix:
125 architecture: [Win32, x64]
126
127 steps:
128 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
129 - name: Run CMake
130 run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
131 - name: Build
132 run: cmake --build build --config Debug --parallel 10
133 - name: Test
134 run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure