Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update Linux runners to Ubuntu 24.04 #98898

Merged
merged 1 commit into from
Nov 11, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
build-android:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: ${{ matrix.name }}
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
godot-cpp-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: Build and test Godot CPP
steps:
- name: Checkout
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ concurrency:

jobs:
build-linux:
runs-on: ubuntu-20.04
# If unspecified, stay one LTS before latest to increase portability of Linux artifacts.
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -60,6 +61,8 @@ jobs:
artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
legacy-scons: true
# Python 3.6 unavailable on 22.04.
os: ubuntu-20.04

- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-thread-sanitizer
Expand Down Expand Up @@ -100,7 +103,7 @@ jobs:
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB8B81E14DA65431D7504EA8F63F0F2B90935439
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu focal main"
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu ${{ matrix.os == 'ubuntu-20.04' && 'focal' || 'jammy' }} main"
sudo apt-get install -qq mesa-vulkan-drivers

# TODO: Figure out somehow how to embed this one.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
jobs:
static-checks:
name: Code style, file formatting, and docs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
web-template:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
name: ${{ matrix.name }}
strategy:
fail-fast: false
Expand Down
7 changes: 4 additions & 3 deletions core/io/http_client_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,16 @@ PackedByteArray HTTPClientTCP::read_response_body_chunk() {
chunk_left -= rec;

if (chunk_left == 0) {
if (chunk[chunk.size() - 2] != '\r' || chunk[chunk.size() - 1] != '\n') {
const int chunk_size = chunk.size();
if (chunk[chunk_size - 2] != '\r' || chunk[chunk_size - 1] != '\n') {
ERR_PRINT("HTTP Invalid chunk terminator (not \\r\\n)");
status = STATUS_CONNECTION_ERROR;
break;
}

ret.resize(chunk.size() - 2);
ret.resize(chunk_size - 2);
uint8_t *w = ret.ptrw();
memcpy(w, chunk.ptr(), chunk.size() - 2);
memcpy(w, chunk.ptr(), chunk_size - 2);
chunk.clear();
}

Expand Down
18 changes: 18 additions & 0 deletions core/io/packet_peer_udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ Error PacketPeerUDP::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
return ERR_UNAVAILABLE;
}

/* Bogus GCC warning here:
* In member function 'int RingBuffer<T>::read(T*, int, bool) [with T = unsigned char]',
* inlined from 'virtual Error PacketPeerUDP::get_packet(const uint8_t**, int&)' at core/io/packet_peer_udp.cpp:112:9,
* inlined from 'virtual Error PacketPeerUDP::get_packet(const uint8_t**, int&)' at core/io/packet_peer_udp.cpp:99:7:
* Error: ./core/ring_buffer.h:68:46: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
* 68 | p_buf[dst++] = read[pos + i];
* | ~~~~~~~~~~~~~^~~~~~~
*/
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wstringop-overflow=0"
#endif

uint32_t size = 0;
uint8_t ipv6[16] = {};
rb.read(ipv6, 16, true);
Expand All @@ -115,6 +128,11 @@ Error PacketPeerUDP::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
--queue_count;
*r_buffer = packet_buffer;
r_buffer_size = size;

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

return OK;
}

Expand Down
4 changes: 2 additions & 2 deletions core/io/stream_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ void StreamPeer::put_var(const Variant &p_variant, bool p_full_objects) {
}

uint8_t StreamPeer::get_u8() {
uint8_t buf[1];
uint8_t buf[1] = {};
get_data(buf, 1);
return buf[0];
}

int8_t StreamPeer::get_8() {
uint8_t buf[1];
uint8_t buf[1] = {};
get_data(buf, 1);
return buf[0];
}
Expand Down
3 changes: 2 additions & 1 deletion scene/2d/tile_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ void TileMap::_set_tile_map_data_using_compatibility_format(int p_layer, TileMap
for (int i = 0; i < c; i += offset) {
const uint8_t *ptr = (const uint8_t *)&r[i];
uint8_t local[12];
for (int j = 0; j < ((p_format >= TileMapDataFormat::TILE_MAP_DATA_FORMAT_2) ? 12 : 8); j++) {
const int buffer_size = (format == TILE_MAP_DATA_FORMAT_2) ? 12 : 8;
for (int j = 0; j < buffer_size; j++) {
local[j] = ptr[j];
}

Expand Down