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

[3.x] CI: Update Linux runners to Ubuntu 24.04, but keep 22.04 for Linux builds #98896

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Nov 6, 2024

Pin clang-format to version 161, and black to 24.10.0.

Mono needs to be reinstalled manually as they removed it in Ubuntu 24.04 images. (Still using the "focal" version, i.e. Ubuntu 20.04, as Mono upstream also no longer provides new versions for Ubuntu.)
In the end we keep Ubuntu 22.04 for the Linux and Server builds for portability, so Mono is still provided.

Footnotes

  1. Could go higher, GH provides 16, 17, and 18 (default) in its Ubuntu 24.04 runner, but at least locally my clang-format 19 implies a bunch of changes and since I want to cherry-pick this to old 3.x branches, where I don't want to bother reformatting code, I'm sticking to something close to the previous 15.

@akien-mga akien-mga added enhancement topic:buildsystem cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:3.6 Considered for cherry-picking into a future 3.6.x release labels Nov 6, 2024
@akien-mga akien-mga added this to the 3.7 milestone Nov 6, 2024
@akien-mga akien-mga requested review from a team as code owners November 6, 2024 14:06
Comment on lines +1272 to +1273
const int buffer_size = (format == FORMAT_2) ? 12 : 8;
for (int j = 0; j < buffer_size; j++) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed to workaround a GCC false positive:

 scene/2d/tile_map.cpp: In member function 'void TileMap::_set_tile_data(const PoolVector<int>&)':
Error: scene/2d/tile_map.cpp:1273:34: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 1273 |                         local[j] = ptr[j];
      |                         ~~~~~~~~~^~~~~~~~
scene/2d/tile_map.cpp:1271:25: note: at offset 12 into destination object 'local' of size 12
 1271 |                 uint8_t local[12];
      |                         ^~~~~

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104789

@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch from 4b6c3a1 to fcdb825 Compare November 6, 2024 14:46
@Repiteo
Copy link
Contributor

Repiteo commented Nov 6, 2024

Will current CI be updated to 24.04 as well, or is this just for 3.x? In either case, what necessitates the version bump?

@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch from fcdb825 to 525ac70 Compare November 6, 2024 15:31
@akien-mga
Copy link
Member Author

Will current CI be updated to 24.04 as well, or is this just for 3.x? In either case, what necessitates the version bump?

We should update 4.x branches too.

The motivation is to be ready for the future removal of GH's ubuntu:20.04 runner, which from experience should happen soon after making the N+2 LTS the default, which is happening now: https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/

@Repiteo
Copy link
Contributor

Repiteo commented Nov 6, 2024

We should update 4.x branches too.

Roger that

@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch from 525ac70 to 62983e8 Compare November 6, 2024 16:01
@akien-mga
Copy link
Member Author

akien-mga commented Nov 6, 2024

I restored the Linux and Server builds to use Ubuntu 22.04 for portability. This also means Mono is still present in the image from GHA and doesn't need to be installed manually.

For when we'd eventually move those to Ubuntu 24.04, here's how to install Mono too:

# Mono, no longer provided in Ubuntu 24.04 images.
# https://github.com/actions/runner-images/blob/ae99c16b0cf27c0cca7ef0b08e7bcf13c33f6cfa/images/ubuntu/scripts/build/install-mono.sh
REPO_URL="https://download.mono-project.com/repo/ubuntu"
GPG_KEY="/usr/share/keyrings/mono-official-stable.gpg"
REPO_PATH="/etc/apt/sources.list.d/mono-official-stable.list"
curl -fsSL https://download.mono-project.com/repo/xamarin.gpg | sudo gpg --dearmor -o $GPG_KEY
echo "deb [signed-by=$GPG_KEY] $REPO_URL stable-focal main" | sudo tee $REPO_PATH
sudo apt-get install --no-install-recommends apt-transport-https mono-complete nuget

@akien-mga akien-mga changed the title [3.x] CI: Update Linux runners to Ubuntu 24.04 [3.x] CI: Update Linux runners to Ubuntu 24.04, but keep 22.04 for Linux builds Nov 6, 2024
@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch from 62983e8 to 4b0e1aa Compare November 6, 2024 16:15
@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch 2 times, most recently from 871053a to e93ea1e Compare November 7, 2024 10:26
Pin clang-format to version 16, and black to 24.10.0.
Keep using Ubuntu 22.04 for Linux builds for portability.
@akien-mga akien-mga force-pushed the 3.x-ci-ubuntu-24.04 branch from e93ea1e to fd9bd10 Compare November 7, 2024 11:50
@akien-mga akien-mga requested a review from Repiteo November 7, 2024 13:20
@akien-mga
Copy link
Member Author

Finally got this working!

@lawnjelly
Copy link
Member

Will leave for you to merge. 👍

@akien-mga akien-mga merged commit 2200e5a into godotengine:3.x Nov 7, 2024
14 checks passed
@akien-mga akien-mga deleted the 3.x-ci-ubuntu-24.04 branch November 7, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:3.6 Considered for cherry-picking into a future 3.6.x release enhancement topic:buildsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants