Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2005 - 2023 Settlers Freaks <sf-team at siedler25.org>
# Copyright (C) 2005 - 2024 Settlers Freaks <sf-team at siedler25.org>
#
# SPDX-License-Identifier: GPL-2.0-or-later

Expand Down Expand Up @@ -27,6 +27,50 @@ env:
ADDITIONAL_CMAKE_FLAGS: -DRTTR_ENABLE_BENCHMARKS=ON

jobs:
Windows:
strategy:
matrix:
include:
- { os: windows-2019, generator: Visual Studio 16 2019, type: Debug, platform: Win32}
- { os: windows-2019, generator: Visual Studio 16 2019, type: Debug, platform: x64}
- { os: windows-2019, generator: Visual Studio 16 2019, type: Release, platform: Win32}
- { os: windows-2019, generator: Visual Studio 16 2019, type: Release, platform: x64}
- { os: windows-2022, generator: Visual Studio 17 2022, type: Debug, platform: Win32}
- { os: windows-2022, generator: Visual Studio 17 2022, type: Debug, platform: x64}
- { os: windows-2022, generator: Visual Studio 17 2022, type: Release, platform: Win32}
- { os: windows-2022, generator: Visual Studio 17 2022, type: Release, platform: x64}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: ${{env.BOOST_VERSION}}
platform_version: ${{matrix.os == 'windows-2019' && '2019' || '2022'}}
toolset: msvc
- name: 'Configure'
env:
BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}}
shell: cmd
run: |
set "INSTALL_DIR=%GITHUB_WORKSPACE%\installed"
mkdir build_dir
cd build_dir
rem Enable LTCG for release builds (speeds up linking as /GL compiled modules are used)
if ${{matrix.type}} == Release (set "cmakeFlags=-DCMAKE_EXE_LINKER_FLAGS=/LTCG -DCMAKE_SHARED_LINKER_FLAGS=/LTCG")
echo "Configuring ${{matrix.generator}} for ${{matrix.type}} on ${{matrix.platform}}"
cmake -G "${{matrix.generator}}" -A ${{matrix.platform}} ^
-DRTTR_ENABLE_WERROR=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ^
-DRTTR_EXTERNAL_BUILD_TESTING=ON -DRTTR_ENABLE_BENCHMARKS=ON ^
%cmakeFlags% ..
- name: 'Build'
run: cmake --build build_dir --config ${{matrix.type}} --parallel 4
- name: 'Test'
run: ctest --test-dir build_dir --output-on-failure -C ${{matrix.type}} --parallel 4

Linux:
strategy:
matrix:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ See more information on <http://www.rttr.info>
## Current Build Info

Build & Tests:
[![Appveyor CI Build Info](https://ci.appveyor.com/api/projects/status/ufw8v9mi80va1me7/branch/master?svg=true)](https://ci.appveyor.com/project/Flow86/s25client/branch/master)
![GHA Unit tests](https://github.com/Return-To-The-Roots/s25client/workflows/Unit%20tests/badge.svg)
![Static analysis](https://github.com/Return-To-The-Roots/s25client/workflows/Static%20analysis/badge.svg)

Expand Down
66 changes: 0 additions & 66 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion libs/libGamedata/lua/CheckedLuaTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ inline T CheckedLuaTable::getOrThrow(const std::string& fieldName)
if(value.isNilref())
throw GameDataLoadError("Required field '" + fieldName + "' not found");
if(value.isConvertible<T>())
return value;
return value.get<T>();
else
throw GameDataLoadError("Field '" + fieldName + "' has the wrong type");
}
Expand Down
Loading