|
1 | | -# Copyright (C) 2005 - 2023 Settlers Freaks <sf-team at siedler25.org> |
| 1 | +# Copyright (C) 2005 - 2024 Settlers Freaks <sf-team at siedler25.org> |
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: GPL-2.0-or-later |
4 | 4 |
|
|
27 | 27 | ADDITIONAL_CMAKE_FLAGS: -DRTTR_ENABLE_BENCHMARKS=ON |
28 | 28 |
|
29 | 29 | jobs: |
| 30 | + Windows: |
| 31 | + defaults: |
| 32 | + run: |
| 33 | + shell: bash |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + include: |
| 37 | + - { os: windows-2019, generator: Visual Studio 16 2019, type: Debug, platform: Win32} |
| 38 | + - { os: windows-2019, generator: Visual Studio 16 2019, type: Debug, platform: x64} |
| 39 | + - { os: windows-2019, generator: Visual Studio 16 2019, type: Release, platform: Win32} |
| 40 | + - { os: windows-2019, generator: Visual Studio 16 2019, type: Release, platform: x64} |
| 41 | + - { os: windows-2022, generator: Visual Studio 17 2022, type: Debug, platform: Win32} |
| 42 | + - { os: windows-2022, generator: Visual Studio 17 2022, type: Debug, platform: x64} |
| 43 | + - { os: windows-2022, generator: Visual Studio 17 2022, type: Release, platform: Win32} |
| 44 | + - { os: windows-2022, generator: Visual Studio 17 2022, type: Release, platform: x64} |
| 45 | + runs-on: ${{matrix.os}} |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + with: |
| 49 | + submodules: true |
| 50 | + - name: Install boost |
| 51 | + |
| 52 | + id: install-boost |
| 53 | + with: |
| 54 | + boost_version: ${{env.BOOST_VERSION}} |
| 55 | + platform_version: ${{matrix.os == 'windows-2019' && '2019' || '2022'}} |
| 56 | + toolset: msvc |
| 57 | + - name: 'Configure' |
| 58 | + env: |
| 59 | + BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} |
| 60 | + run: | |
| 61 | + INSTALL_DIR=$GITHUB_WORKSPACE\installed |
| 62 | + mkdir build |
| 63 | + cd build |
| 64 | + # Enable LTCG for release builds (speeds up linking as /GL compiled modules are used) |
| 65 | + if [[ "${{matrix.type}}" == "Release" ]]; then |
| 66 | + cmakeFlags="-DCMAKE_EXE_LINKER_FLAGS=/LTCG -DCMAKE_SHARED_LINKER_FLAGS=/LTCG" |
| 67 | + else |
| 68 | + cmakeFlags="" |
| 69 | + fi |
| 70 | + env | grep LTCG || true |
| 71 | + env | grep "C:/Program Files/Git" || true |
| 72 | + set -x |
| 73 | + echo "Configuring ${{matrix.generator}} for ${{matrix.type}} on ${{matrix.platform}}" |
| 74 | + cmake -G "${{matrix.generator}}" -A ${{matrix.platform}} \ |
| 75 | + -DRTTR_ENABLE_WERROR=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ |
| 76 | + -DRTTR_EXTERNAL_BUILD_TESTING=ON -DRTTR_ENABLE_BENCHMARKS=ON \ |
| 77 | + $cmakeFlags .. |
| 78 | + - name: 'Build' |
| 79 | + run: cmake --build . --config ${{matrix.type}} --parallel 4 |
| 80 | + - name: 'Test' |
| 81 | + run: ctest --output-on-failure -C ${{matrix.type}} --parallel 4 |
| 82 | + |
30 | 83 | Linux: |
31 | 84 | strategy: |
32 | 85 | matrix: |
|
0 commit comments