2023-12-20 21:35:19 +01:00
|
|
|
name: linux
|
|
|
|
|
|
|
|
# build on c/cpp changes or workflow changes
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'lib/**.[ch]'
|
|
|
|
- 'lib/**.cpp'
|
|
|
|
- 'src/**.[ch]'
|
|
|
|
- 'src/**.cpp'
|
2024-03-21 23:54:28 +01:00
|
|
|
- 'irr/**.[ch]'
|
|
|
|
- 'irr/**.cpp'
|
2023-12-20 21:35:19 +01:00
|
|
|
- '**/CMakeLists.txt'
|
|
|
|
- 'cmake/Modules/**'
|
|
|
|
- 'util/ci/**'
|
|
|
|
- 'Dockerfile'
|
|
|
|
- '.dockerignore'
|
|
|
|
- '.github/workflows/linux.yml'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'lib/**.[ch]'
|
|
|
|
- 'lib/**.cpp'
|
|
|
|
- 'src/**.[ch]'
|
|
|
|
- 'src/**.cpp'
|
2024-06-03 01:14:15 +02:00
|
|
|
- 'irr/**.[ch]'
|
|
|
|
- 'irr/**.cpp'
|
2023-12-20 21:35:19 +01:00
|
|
|
- '**/CMakeLists.txt'
|
|
|
|
- 'cmake/Modules/**'
|
|
|
|
- 'util/ci/**'
|
|
|
|
- 'Dockerfile'
|
|
|
|
- '.dockerignore'
|
|
|
|
- '.github/workflows/linux.yml'
|
|
|
|
|
|
|
|
env:
|
|
|
|
MINETEST_POSTGRESQL_CONNECT_STRING: 'host=localhost user=minetest password=minetest dbname=minetest'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Older gcc version (should be close to our minimum supported version)
|
|
|
|
gcc_7:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 21:35:19 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
source ./util/ci/common.sh
|
|
|
|
install_linux_deps g++-7
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
./util/ci/build.sh
|
|
|
|
env:
|
|
|
|
CC: gcc-7
|
|
|
|
CXX: g++-7
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
./bin/minetest --run-unittests
|
|
|
|
|
|
|
|
# Current gcc version
|
2024-06-03 20:39:02 +02:00
|
|
|
gcc_14:
|
|
|
|
runs-on: ubuntu-24.04
|
2023-12-20 21:35:19 +01:00
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 21:35:19 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
source ./util/ci/common.sh
|
2024-06-03 20:39:02 +02:00
|
|
|
install_linux_deps g++-14 libluajit-5.1-dev
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
./util/ci/build.sh
|
|
|
|
env:
|
2024-06-03 20:39:02 +02:00
|
|
|
CC: gcc-14
|
|
|
|
CXX: g++-14
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
2024-01-10 17:40:19 +01:00
|
|
|
mkdir nowrite
|
|
|
|
chmod a-w nowrite
|
|
|
|
cd nowrite
|
|
|
|
../bin/minetest --run-unittests
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
# Older clang version (should be close to our minimum supported version)
|
|
|
|
clang_7:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 21:35:19 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
source ./util/ci/common.sh
|
2024-01-20 18:18:00 +01:00
|
|
|
install_linux_deps clang-7 llvm
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
./util/ci/build.sh
|
|
|
|
env:
|
|
|
|
CC: clang-7
|
|
|
|
CXX: clang++-7
|
2024-01-20 18:18:00 +01:00
|
|
|
CMAKE_FLAGS: '-DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"'
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Unittest
|
|
|
|
run: |
|
|
|
|
./bin/minetest --run-unittests
|
|
|
|
|
|
|
|
# Current clang version
|
2024-06-03 20:39:02 +02:00
|
|
|
clang_18:
|
|
|
|
runs-on: ubuntu-24.04
|
2023-12-20 21:35:19 +01:00
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 21:35:19 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
source ./util/ci/common.sh
|
2024-06-03 20:39:02 +02:00
|
|
|
install_linux_deps clang-18 lldb
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
./util/ci/build.sh
|
|
|
|
env:
|
2024-06-03 20:39:02 +02:00
|
|
|
CC: clang-18
|
|
|
|
CXX: clang++-18
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
./bin/minetest --run-unittests
|
|
|
|
|
|
|
|
- name: Integration test + devtest
|
|
|
|
run: |
|
|
|
|
./util/test_multiplayer.sh
|
|
|
|
|
|
|
|
# Build with prometheus-cpp (server-only)
|
2024-06-03 20:39:02 +02:00
|
|
|
clang_11_prometheus:
|
|
|
|
name: "clang_11 (PROMETHEUS=1)"
|
|
|
|
runs-on: ubuntu-22.04
|
2023-12-20 21:35:19 +01:00
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-20 21:35:19 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
source ./util/ci/common.sh
|
2024-06-03 20:39:02 +02:00
|
|
|
install_linux_deps clang-11
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Build prometheus-cpp
|
2024-06-03 20:39:02 +02:00
|
|
|
run: ./util/ci/build_prometheus_cpp.sh
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
./util/ci/build.sh
|
|
|
|
env:
|
2024-06-03 20:39:02 +02:00
|
|
|
CC: clang-11
|
|
|
|
CXX: clang++-11
|
|
|
|
CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
|
2023-12-20 21:35:19 +01:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
./bin/minetestserver --run-unittests
|