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
38 changes: 27 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ on:

jobs:
ubuntu-gcc-build:
name: ubuntu-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build
runs-on: ubuntu-latest
name: ${{ matrix.os }}-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [gcc-12, gcc-14]
cppVersion: [17, 20]
compiler: [gcc-12, gcc-13, gcc-15]
cppVersion: [20, 23]
include:
- compiler: gcc-12
cxx: g++-12
- compiler: gcc-14
cxx: g++-14
os: ubuntu-24.04
- compiler: gcc-13
cxx: g++-13
os: ubuntu-latest
- compiler: gcc-15
cxx: g++-15
os: ubuntu-latest

steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -65,17 +71,27 @@ jobs:
key: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }}

ubuntu-clang-build:
name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }}
runs-on: ubuntu-latest
name: ${{ matrix.os }}-${{ matrix.compiler }}-C++${{ matrix.cppVersion }}-build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cppVersion: [17, 20]
compiler: [clang++-16, clang++-18]
cppVersion: [20, 23]
compiler: [clang++-16, clang++-20, clang++-22]
exclude:
# Clang 16 is not happy with c++23
- compiler: clang++-16
cppVersion: 23
include:
- compiler: clang++-16
enable_file_prefix_map: true
- compiler: clang++-18
os: ubuntu-24.04
- compiler: clang++-20
enable_file_prefix_map: true
os: ubuntu-latest
- compiler: clang++-22
enable_file_prefix_map: true
os: ubuntu-latest

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ActionPriorityLists
profiles
.git
key: ubuntu-clang++-16-for_run-${{ github.sha }}-cpp-17
key: ubuntu-clang++-20-for_run-${{ github.sha }}-cpp-20

- uses: actions/checkout@v6

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
uses: ./.github/workflows/spec_test.yml
with:
cache-key: ubuntu-clang++-16-for_run-${{ github.sha }}-cpp-17
cache-key: ubuntu-clang++-20-for_run-${{ github.sha }}-cpp-20
is-ptr: false
spec-matrix: ${{ needs.spec-test-selection.outputs.spec-matrix }}

Expand All @@ -211,7 +211,7 @@ jobs:
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
uses: ./.github/workflows/spec_test.yml
with:
cache-key: ubuntu-clang++-16-for_run-${{ github.sha }}-cpp-17
cache-key: ubuntu-clang++-20-for_run-${{ github.sha }}-cpp-20
is-ptr: true
spec-matrix: ${{ needs.spec-test-selection.outputs.spec-matrix }}

Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/ubuntu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,28 @@ env:

jobs:
ubuntu-test:
name: ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-${{ matrix.type }}
runs-on: ubuntu-latest
name: ${{ matrix.os }}-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-${{ matrix.type }}
runs-on: ${{ matrix.os }}
env:
CACHE_KEY: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }}
UBSAN_OPTIONS: print_stacktrace=1

strategy:
fail-fast: false
matrix:
cppVersion: [17, 20]
compiler: [clang++-16, clang++-18, gcc-12, gcc-14]
cppVersion: [20, 23]
compiler: [clang++-16, clang++-20, clang++-22, gcc-12, gcc-13, gcc-15]
exclude:
# clang 16 is not happy with c++23
- compiler: clang++-16
cppVersion: 23
include:
- { compiler: clang++-16, os: ubuntu-24.04 }
- { compiler: gcc-12, os: ubuntu-24.04 }
- { compiler: clang++-20, os: ubuntu-latest }
- { compiler: clang++-22, os: ubuntu-latest }
- { compiler: gcc-13, os: ubuntu-latest }
- { compiler: gcc-15, os: ubuntu-latest }

steps:
- uses: actions/cache@v5
Expand All @@ -41,7 +52,7 @@ jobs:
run: ${{ runner.workspace }}/b/ninja/simc $SIMC_ARGS $SIMC_PROFILE iterations=10 fight_style=DungeonSlice allow_experimental_specializations=1 cleanup_threads=1

- name: Clear Cache
if: ( matrix.compiler != 'clang++-16' || matrix.cppVersion != '17' ) && github.event_name == 'push'
if: ( matrix.compiler != 'clang++-20' || matrix.cppVersion != '20' ) && github.event_name == 'push'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh cache delete ${{ env.CACHE_KEY }}
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Projects Settings
cmake_minimum_required (VERSION 3.10...3.22)
cmake_minimum_required (VERSION 3.12...3.22)

# Set OSX minimum version parity with Qt project
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
Expand All @@ -18,7 +18,7 @@ option(SC_USE_FLAT_INSTALL "Install files into a flat folder structure" ${WIN32}

option(SC_EVENT_QUEUE_DEBUG "Enable Event Queue Debug Info" OFF)

set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
12 changes: 6 additions & 6 deletions engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ endif

MKDIR = mkdir
CXX = c++
CPP_FLAGS = -Wall -Wextra -W -I. -I./include -I./lib -DSC_SHARED_DATA=\"$(SHARED_DATA)\" --std=c++17 -O3 -MMD -MP \
CPP_FLAGS = -Wall -Wextra -W -I. -I./include -I./lib -DSC_SHARED_DATA=\"$(SHARED_DATA)\" --std=c++20 -O3 -MMD -MP \
-Wpedantic \
-Wcast-qual \
-Wconversion-null
Expand Down Expand Up @@ -109,8 +109,8 @@ endif
ifneq (${NO_DEBUG},)
CPP_FLAGS += -DNDEBUG
endif
ifneq (${C++20},)
CPP_FLAGS += --std=c++20
ifneq (${C++23},)
CPP_FLAGS += --std=c++23
endif
ifneq (${LTO},)
OPTS_INTERNAL += -flto
Expand Down Expand Up @@ -290,19 +290,19 @@ clean: mostlyclean
# Unit Tests
sc_http$(MODULE_EXT): interfaces$(PATHSEP)sc_http.cpp util$(PATHSEP)sc_io.cpp sc_thread.cpp sc_util.cpp
-@echo [$@] Linking
$(CXX) $(CPP_FLAGS) -std=c++0x -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)
$(CXX) $(CPP_FLAGS) -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)

rng$(MODULE_EXT): util$(PATHSEP)rng.cpp lib$(PATHSEP)fmt$(PATHSEP)format.cpp util$(PATHSEP)chrono.cpp
-@echo [$@] Linking
$(CXX) $(CPP_FLAGS) -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)

timeline$(MODULE_EXT): util$(PATHSEP)timeline.hpp util$(PATHSEP)timeline.cpp
-@echo [$@] Linking
$(CXX) $(CPP_FLAGS) -std=c++0x -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)
$(CXX) $(CPP_FLAGS) -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)

sample_data$(MODULE_EXT): util$(PATHSEP)sample_data.hpp util$(PATHSEP)sample_data.cpp
-@echo [$@] Linking
$(CXX) $(CPP_FLAGS) -std=c++0x -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)
$(CXX) $(CPP_FLAGS) -DUNIT_TEST $(OPTS_INTERNAL) $(OPTS) $(LINK_FLAGS) $^ -o $@ $(LINK_LIBS)

sc_expressions$(MODULE_EXT): sim$(PATHSEP)sc_expressions.cpp sc_util.cpp
-@echo [$@] Linking
Expand Down
25 changes: 7 additions & 18 deletions engine/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,17 @@
// Compiler Minimal Limits
// ==========================================================================


// Last updated 2023-09: Support gcc7 / clang 5 / MSVS 19.14 which have (~full) C++17 support
// Ubuntu LTS EOL is +5 years, Debian has ~+3year EOL, +5 years with separate LTS support
// Debian 10 (Buster) (Release 2019-07): gcc 8.3 clang 7
// Ubuntu 20.04: gcc 9.3 clang 10
// Debian 11 (Bullseye) (Release 2021-08): gcc 10.2 clang 11
// Ubuntu 22.04: gcc 11.2 clang 14
// Debian 12 (Bookworm) (Release 2023-06): gcc 12.2 clang 14
//
// CI setup currently only supports Ubuntu 20.04+, which has clang 7 as the lowest installable version -
// so clang 5/6 builds are not actually tested in CI.
#if defined( SC_CLANG ) && SC_CLANG < 50000
# error "clang++ below version 5 not supported"
// Last updated 2026-10: Support gcc10 / clang 14 / MSVS 16.10 (MSVC 19.29) which have (~full) C++20 support
#if defined( SC_CLANG ) && SC_CLANG < 140000
# error "clang++ below version 14 not supported"
#endif
#if defined( SC_GCC ) && SC_GCC < 70000
# error "g++ below version 7 not supported"
#if defined( SC_GCC ) && SC_GCC < 100000
# error "g++ below version 10 not supported"
#endif
#if defined( SC_VS ) && SC_VS < 1914
# error "Visual Studio 2017 below version 15.7 not supported"
#if defined( SC_VS ) && SC_VS < 1929
# error "Visual Studio 2019 below version 16.10 not supported"
#endif


// ==========================================================================
// General Macros/Defines
// ==========================================================================
Expand Down
1 change: 1 addition & 0 deletions engine/lib/tcb/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This is an implementation of C++20's std::span
#include <array>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <type_traits>

#ifndef TCB_SPAN_NO_EXCEPTIONS
Expand Down
2 changes: 2 additions & 0 deletions engine/sim/profileset_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ profileset_controller_t::profileset_controller_t( sim_t* sim, unsigned int id )
assert( sim && sim->parent );
}

profileset_controller_t::~profileset_controller_t() = default;

const std::string profileset_controller_t::message( call_point_e call_point )
{
std::string msg = fmt::format( "Profileset {} was canceled by Profileset Controller {} after {}",
Expand Down
2 changes: 1 addition & 1 deletion engine/sim/profileset_control.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct profileset_controller_t : private noncopyable
std::vector<std::unique_ptr<option_t>> options;

profileset_controller_t( sim_t*, unsigned int );
virtual ~profileset_controller_t() = default;
virtual ~profileset_controller_t();

const std::string message( call_point_e );
void add_option( std::unique_ptr<option_t>&& );
Expand Down
37 changes: 0 additions & 37 deletions simc_vs2017.sln

This file was deleted.

2 changes: 1 addition & 1 deletion simulationcraft.pri
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ INCLUDEPATH += ../engine/include
INCLUDEPATH += ../engine/lib
DEPENDPATH = ../engine
VPATH = ..
CONFIG += c++17
CONFIG += c++20

CONFIG(debug, debug|release): OBJECTS_DIR = build/debug
CONFIG(release, debug|release): OBJECTS_DIR = build/release
Expand Down
7 changes: 0 additions & 7 deletions vs/Qt_vs2017.props

This file was deleted.

Loading
Loading