diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1997385c8..5dddae13f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -305,19 +305,14 @@ jobs: # Use `-fno-var-tracking-assignments` to reduce amount of produced debug information. This is necessary due to 100MiB limit of GitHub / openrct2.org API. - platform: x86_64 distro: Ubuntu - release: jammy - image: openrct2/openrct2-build:14-jammy + release: noble + image: openrct2/openrct2-build:16-noble build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" - platform: x86_64 distro: Debian - release: bullseye - image: openrct2/openrct2-build:14-bullseye + release: bookworm + image: openrct2/openrct2-build:16-bookworm build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" -DWITH_TESTS=off - - platform: i686 - distro: Ubuntu - release: jammy - image: openrct2/openrct2-build:14-jammy32 - build_flags: -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -g -gz" -DWITH_TESTS=off steps: - name: Checkout uses: actions/checkout@v4 @@ -355,7 +350,7 @@ jobs: name: Ubuntu Linux (AppImage, x86_64) runs-on: ubuntu-latest needs: check-code-formatting - container: openrct2/openrct2-build:14-jammy + container: openrct2/openrct2-build:16-noble steps: - name: Checkout uses: actions/checkout@v4 @@ -410,10 +405,10 @@ jobs: echo 'Image not pushed' fi linux-clang: - name: Ubuntu Linux (jammy, debug, [http, network, flac, vorbis OpenGL] disabled) using clang + name: Ubuntu Linux (noble, debug, [http, network, flac, vorbis OpenGL] disabled) using clang runs-on: ubuntu-latest needs: check-code-formatting - container: openrct2/openrct2-build:14-jammy + container: openrct2/openrct2-build:16-noble steps: - name: Checkout uses: actions/checkout@v4 @@ -429,7 +424,7 @@ jobs: name: Ubuntu Linux (debug) using clang, coverage enabled runs-on: ubuntu-latest needs: check-code-formatting - container: openrct2/openrct2-build:14-jammy + container: openrct2/openrct2-build:16-noble steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index d2f368321f..b7535fbc30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,10 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() +if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12") + message(FATAL_ERROR "GCC 12+ required. Older GCC are known to fail compilation") +endif() + # Note: Searching for CCache must be before project() so project() can use CCache too # if it is available list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 55882a1097..27cb45aa71 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -31,6 +31,13 @@ if (ENABLE_SCRIPTING) endif () add_library(${PROJECT_NAME} ${OPENRCT2_CORE_SOURCES} ${OPENRCT2_CORE_MM_SOURCES} ${OPENRCT2_DUKTAPE_SOURCES}) +if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13") + message(WARNING "Buggy GCC 12 detected! Disabling some warnings") + set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/localisation/FormatCodes.cpp" PROPERTIES COMPILE_FLAGS "-Wno-restrict") + set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/platform/Platform.Posix.cpp" PROPERTIES COMPILE_FLAGS "-Wno-restrict") + set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/ride/Ride.cpp" PROPERTIES COMPILE_FLAGS "-Wno-null-dereference") + set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/scenario/Scenario.cpp" PROPERTIES COMPILE_FLAGS "-Wno-restrict") +endif() if (APPLE) target_link_platform_libraries(${PROJECT_NAME}) endif ()