Update Debian CI to Bookworm, Ubuntu CI to Noble (#22493)

* Update Debian CI image to Bookworm

* Disable optimizations for files tripping GCC 12

* Try disabling warnings instead of optimizations

* Update Ubuntu from jammy (22.04) to noble (24.04), drop i386

Dropping i386 as there are packages missing in upstream repository
required for OpenRCT2, such as https://packages.ubuntu.com/noble/libzip-dev

* Deprecate GCC older than 12

* Update Debian Bookworm CI configuration

* Update remaining jobs from Ubuntu jammy to noble

* Update docker images to v16 for libclang-rt-dev
This commit is contained in:
Michał Janiszewski 2024-09-06 22:05:04 +02:00 committed by GitHub
parent 14f92966a6
commit 125ae170b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 13 deletions

View file

@ -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

View file

@ -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")

View file

@ -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 ()