|
22 | 22 | - name: Check formatting |
23 | 23 | run: | |
24 | 24 | git fetch --depth=1 origin master |
25 | | - FILES=$(git ls-files '*.cpp' '*.hpp' '*.h' '*.ixx') |
26 | | - if [ -n "$FILES" ]; then |
27 | | - clang-format -style=file -output-replacements-xml $FILES | grep "<replacement " >/dev/null \ |
28 | | - && { echo "Code is not properly formatted"; exit 1; } \ |
29 | | - || echo "All good" |
30 | | - else |
31 | | - echo "No files to format" |
32 | | - fi |
| 25 | + clang-format -style=file -output-replacements-xml $(git ls-files '*.cpp' '*.h' '*.ixx' '*.hpp') | grep "<replacement " && echo "Code is not properly formatted" && exit 1 || echo "All good" |
33 | 26 |
|
34 | 27 | build: |
35 | 28 | name: Build project |
@@ -62,30 +55,30 @@ jobs: |
62 | 55 | fi |
63 | 56 | shell: bash |
64 | 57 |
|
65 | | - - name: Configure (Ubuntu + clang) |
66 | | - if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang' |
| 58 | + - name: Configure CMake |
67 | 59 | run: | |
68 | 60 | mkdir build |
69 | 61 | cd build |
70 | | - cmake -G Ninja -DCMAKE_CXX_COMPILER=clang++ .. |
| 62 | + if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then |
| 63 | + if [ "${{ matrix.compiler }}" == "clang" ]; then |
| 64 | + cmake -G Ninja -DCMAKE_CXX_COMPILER=clang++ .. |
| 65 | + fi |
| 66 | + elif [ "${{ matrix.os }}" == "windows-latest" ]; then |
| 67 | + if [ "${{ matrix.compiler }}" == "msvc" ]; then |
| 68 | + # Force the real MSVC toolset (cl.exe) |
| 69 | + cmake -G "Visual Studio 17 2022" -A x64 .. |
| 70 | + elif [ "${{ matrix.compiler }}" == "clang" ]; then |
| 71 | + # Explicit clang-cl on Windows |
| 72 | + cmake -G Ninja -DCMAKE_CXX_COMPILER=clang-cl .. |
| 73 | + fi |
| 74 | + fi |
71 | 75 | shell: bash |
72 | 76 |
|
73 | | - - name: Configure (Windows + msvc) |
74 | | - if: matrix.os == 'windows-latest' && matrix.compiler == 'msvc' |
75 | | - run: | |
76 | | - mkdir build |
77 | | - cd build |
78 | | - cmake -G "Visual Studio 17 2022" -A x64 .. |
79 | | - shell: pwsh |
80 | | - |
81 | | - - name: Configure (Windows + clang) |
82 | | - if: matrix.os == 'windows-latest' && matrix.compiler == 'clang' |
83 | | - run: | |
84 | | - mkdir build |
85 | | - cd build |
86 | | - cmake -G Ninja -DCMAKE_CXX_COMPILER=clang++ .. |
87 | | - shell: pwsh |
88 | | - |
89 | 77 | - name: Build |
90 | | - run: cmake --build build --config Release |
| 78 | + run: | |
| 79 | + if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" == "msvc" ]; then |
| 80 | + cmake --build build --config Release |
| 81 | + else |
| 82 | + cmake --build build --config Release |
| 83 | + fi |
91 | 84 | shell: bash |
0 commit comments