1
0
mirror of https://github.com/minetest/minetest.git synced 2024-11-13 14:00:29 +01:00

Update some workflows to newer Ubuntu versions (#14668)

This commit is contained in:
sfan5 2024-06-03 20:39:02 +02:00 committed by GitHub
parent ec9c000be9
commit 87232358d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 45 additions and 52 deletions

View File

@ -29,13 +29,13 @@ on:
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gettext openjdk-11-jdk-headless
sudo apt-get install -y --no-install-recommends gettext openjdk-17-jdk-headless
- name: Build AAB with Gradle
# We build an AAB as well for uploading to the the Play Store.
run: cd android; ./gradlew bundlerelease

View File

@ -57,21 +57,21 @@ jobs:
./bin/minetest --run-unittests
# Current gcc version
gcc_12:
runs-on: ubuntu-22.04
gcc_14:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps g++-12 libluajit-5.1-dev
install_linux_deps g++-14 libluajit-5.1-dev
- name: Build
run: |
./util/ci/build.sh
env:
CC: gcc-12
CXX: g++-12
CC: gcc-14
CXX: g++-14
- name: Test
run: |
@ -103,21 +103,21 @@ jobs:
./bin/minetest --run-unittests
# Current clang version
clang_14:
runs-on: ubuntu-22.04
clang_18:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps clang-14 lldb
install_linux_deps clang-18 lldb
- name: Build
run: |
./util/ci/build.sh
env:
CC: clang-14
CXX: clang++-14
CC: clang-18
CXX: clang++-18
- name: Test
run: |
@ -128,27 +128,26 @@ jobs:
./util/test_multiplayer.sh
# Build with prometheus-cpp (server-only)
clang_9_prometheus:
name: "clang_9 (PROMETHEUS=1)"
runs-on: ubuntu-20.04
clang_11_prometheus:
name: "clang_11 (PROMETHEUS=1)"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps clang-9
install_linux_deps clang-11
- name: Build prometheus-cpp
run: |
./util/ci/build_prometheus_cpp.sh
run: ./util/ci/build_prometheus_cpp.sh
- name: Build
run: |
./util/ci/build.sh
env:
CC: clang-9
CXX: clang++-9
CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0"
CC: clang-11
CXX: clang++-11
CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
- name: Test
run: |

View File

@ -17,7 +17,7 @@ jobs:
# Note that the integration tests are also run in build.yml, but only when C++ code is changed.
integration_tests:
name: "Compile and run multiplayer tests"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install deps
@ -39,7 +39,7 @@ jobs:
luacheck:
name: "Builtin Luacheck and Unit Tests"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
@ -50,11 +50,7 @@ jobs:
- uses: leafo/gh-actions-luarocks@v4.3.0
- name: Install LuaJIT
run: |
cd $HOME
git clone https://github.com/LuaJIT/LuaJIT/
cd LuaJIT
make -j$(nproc)
run: ./util/ci/build_luajit.sh
- name: Install luarocks tools
run: |

View File

@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "exceptions.h"
#include "util/numeric.h"
#include <optional>
#include <algorithm>
std::string ModConfiguration::getUnsatisfiedModsError() const
{

View File

@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "porting.h"
#include "settings.h"
#include <algorithm>
///////////////////////////////////////////////////////////////////////////////

6
util/ci/build_luajit.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash -eu
cd $HOME
git clone --depth 1 https://github.com/LuaJIT/LuaJIT
pushd LuaJIT
make -j$(nproc)
popd

View File

@ -1,7 +1,7 @@
#! /bin/bash -eu
#!/bin/bash -eu
cd /tmp
git clone --recursive https://github.com/jupp0r/prometheus-cpp
git clone --recursive --depth 1 --shallow-submodules \
https://github.com/jupp0r/prometheus-cpp
mkdir prometheus-cpp/build
cd prometheus-cpp/build
cmake .. \

View File

@ -4,7 +4,7 @@
install_linux_deps() {
local pkgs=(
cmake gettext postgresql
libpng-dev libjpeg-dev libgl1-mesa-dev libsdl2-dev
libpng-dev libjpeg-dev libgl1-mesa-dev libsdl2-dev libfreetype-dev
libsqlite3-dev libhiredis-dev libogg-dev libgmp-dev libvorbis-dev
libopenal-dev libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev
)
@ -12,11 +12,16 @@ install_linux_deps() {
sudo apt-get update
sudo apt-get install -y --no-install-recommends "${pkgs[@]}" "$@"
sudo systemctl start postgresql.service
sudo -u postgres psql <<<"
CREATE USER minetest WITH PASSWORD 'minetest';
CREATE DATABASE minetest;
"
# set up Postgres for unit tests
if [ -n "$MINETEST_POSTGRESQL_CONNECT_STRING" ]; then
sudo systemctl start postgresql.service
sudo -u postgres psql <<<"
CREATE USER minetest WITH PASSWORD 'minetest';
CREATE DATABASE minetest;
\c minetest
GRANT ALL ON SCHEMA public TO minetest;
"
fi
}
# macOS build only

View File

@ -1,15 +0,0 @@
#!/bin/sh -e
name=${CONTAINER_IMAGE}/server
# build and publish Docker image (gitlab-ci)
docker build . \
-t ${name}:${CI_COMMIT_SHA} \
-t ${name}:${CI_COMMIT_REF_NAME} \
-t ${name}:latest
docker push ${name}:${CI_COMMIT_SHA}
docker push ${name}:${CI_COMMIT_REF_NAME}
[ "$CI_COMMIT_BRANCH" = master ] && docker push ${name}:latest
exit 0