Build the editor on CI #146
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (C) 2026 Settlers Freaks <sf-team at siedler25.org> | |
| # | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ${{ format('s25edit-{0}:{1}', github.repository, github.ref) }} | |
| cancel-in-progress: true | |
| jobs: | |
| static-analysis: | |
| name: Static analysis | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install REUSE | |
| run: | | |
| pip install --user reuse | |
| - name: Formatting | |
| uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2 | |
| with: | |
| source: "." | |
| clangFormatVersion: 10 | |
| - name: Check include guards (#pragma once) | |
| run: | | |
| find . -path ./.git -prune -false \ | |
| -o -path ./build -prune -false \ | |
| -o -path ./SGE -prune -false \ | |
| -o \( -name '*.hpp' -o -name '*.h' \) \ | |
| -print0 | xargs -0 -n1 tools/ci/checkIncludeGuards.sh | |
| - name: Check licensing (REUSE) | |
| run: reuse lint | |
| build: | |
| runs-on: ${{matrix.os}}-${{matrix.os_version}} | |
| strategy: | |
| matrix: | |
| include: | |
| - { os: ubuntu, os_version: 22.04, toolset: gcc, boost: 1.78.0, generator: 'Unix Makefiles' } | |
| - { os: ubuntu, os_version: 24.04, toolset: gcc, boost: 1.91.0, generator: 'Unix Makefiles' } | |
| - { os: windows, os_version: 2022, toolset: msvc, boost: 1.78.0, generator: 'Visual Studio 17 2022' } | |
| - { os: windows, os_version: 2025, toolset: msvc, boost: 1.91.0, generator: 'Visual Studio 18 2025' } | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: Return-To-The-Roots/s25client | |
| ref: master | |
| submodules: true | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: external/s25edit | |
| submodules: true | |
| - name: Install boost | |
| uses: MarkusJx/install-boost@f9d34f6fe427b8f2ae424d7bf2a3ebccb0dae5a3 # v2.6.0 | |
| id: install-boost | |
| with: | |
| boost_version: ${{matrix.boost}} | |
| platform_version: ${{matrix.os_version}} | |
| boost_install_dir: contrib | |
| toolset: ${{matrix.toolset}} | |
| link: static | |
| - name: Configure | |
| env: | |
| BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} | |
| run: | | |
| mkdir build_dir | |
| cd build_dir | |
| echo "Configuring ${{matrix.generator}}" | |
| cmake -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=Debug -DRTTR_ENABLE_WERROR=ON -DRTTR_USE_STATIC_BOOST=ON -DRTTR_EXTERNAL_BUILD_TESTING=ON -DRTTR_INCLUDE_DEVTOOLS=ON .. | |
| - name: 'Build' | |
| run: cmake --build build_dir --config Debug --parallel 4 --target s25edit |