Add build deb13 (#469)

add/test Debian 13 build to github actions

Closes #464 

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
This commit is contained in:
Tixx
2026-02-19 20:07:28 +01:00
committed by GitHub
8 changed files with 70 additions and 19 deletions

View File

@@ -3,11 +3,11 @@ name: Linux
on: on:
push: push:
branches: branches:
- 'develop' - "develop"
- 'minor' - "minor"
pull_request: pull_request:
env: env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_FORCE_SYSTEM_BINARIES: 1 VCPKG_FORCE_SYSTEM_BINARIES: 1
CMAKE_BUILD_TYPE: "Release" CMAKE_BUILD_TYPE: "Release"
@@ -21,6 +21,8 @@ jobs:
include: include:
- distro: debian - distro: debian
version: 12 version: 12
- distro: debian
version: 13
- distro: ubuntu - distro: ubuntu
version: 22.04 version: 22.04
- distro: ubuntu - distro: ubuntu
@@ -30,7 +32,7 @@ jobs:
steps: steps:
- name: get-cmake - name: get-cmake
uses: lukka/get-cmake@v3.28.1 uses: lukka/get-cmake@v3.28.1
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
@@ -45,7 +47,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Git config safe directory - name: Git config safe directory
@@ -91,6 +93,8 @@ jobs:
include: include:
- distro: debian - distro: debian
version: 12 version: 12
- distro: debian
version: 13
- distro: ubuntu - distro: ubuntu
version: 22.04 version: 22.04
- distro: ubuntu - distro: ubuntu
@@ -100,7 +104,7 @@ jobs:
steps: steps:
- name: get-cmake - name: get-cmake
uses: lukka/get-cmake@v3.28.1 uses: lukka/get-cmake@v3.28.1
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
@@ -115,7 +119,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Git config safe directory - name: Git config safe directory
@@ -151,4 +155,3 @@ jobs:
- name: Test - name: Test
run: ./bin/BeamMP-Server-tests run: ./bin/BeamMP-Server-tests

View File

@@ -3,7 +3,7 @@ on:
push: push:
# Sequence of patterns matched against refs/tags # Sequence of patterns matched against refs/tags
tags: tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
env: env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
@@ -14,8 +14,8 @@ jobs:
create-release: create-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Create Release name: Create Release
outputs: outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
steps: steps:
- name: Create Release - name: Create Release
id: create_release id: create_release
@@ -40,6 +40,8 @@ jobs:
include: include:
- distro: debian - distro: debian
version: 12 version: 12
- distro: debian
version: 13
- distro: ubuntu - distro: ubuntu
version: 22.04 version: 22.04
- distro: ubuntu - distro: ubuntu
@@ -49,7 +51,7 @@ jobs:
steps: steps:
- name: get-cmake - name: get-cmake
uses: lukka/get-cmake@v3.28.1 uses: lukka/get-cmake@v3.28.1
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
@@ -64,7 +66,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Git config safe directory - name: Git config safe directory
@@ -81,7 +83,7 @@ jobs:
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh
- name: Upload Release Asset - name: Upload Release Asset
id: upload-release-asset id: upload-release-asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -110,6 +112,8 @@ jobs:
include: include:
- distro: debian - distro: debian
version: 12 version: 12
- distro: debian
version: 13
- distro: ubuntu - distro: ubuntu
version: 22.04 version: 22.04
- distro: ubuntu - distro: ubuntu
@@ -122,7 +126,7 @@ jobs:
steps: steps:
- name: get-cmake - name: get-cmake
uses: lukka/get-cmake@v3.28.1 uses: lukka/get-cmake@v3.28.1
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
@@ -137,7 +141,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Git config safe directory - name: Git config safe directory
@@ -154,7 +158,7 @@ jobs:
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh
- name: Upload Release Asset - name: Upload Release Asset
id: upload-release-asset id: upload-release-asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -191,7 +195,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Create Build Environment - name: Create Build Environment
@@ -203,7 +207,7 @@ jobs:
run: bash ./scripts/windows/2-build.sh run: bash ./scripts/windows/2-build.sh
- name: Upload Release Asset - name: Upload Release Asset
id: upload-release-asset id: upload-release-asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -ex
apt-get update -y
apt-get install -y liblua5.3-0 liblua5.3-dev curl zip unzip tar cmake make git g++ ninja-build

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -ex
git config --global --add safe.directory $(pwd)
git config --global --add safe.directory $(pwd)/vcpkg
git config --global --add safe.directory $(pwd)/deps/commandline

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -ex
./vcpkg/bootstrap-vcpkg.sh
cmake . -B bin $1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -g -Wl,-z,norelro -Wl,--hash-style=gnu -Wl,-z,noseparate-code -ffunction-sections -fdata-sections -Wl,--gc-sections" -DBeamMP-Server_ENABLE_LTO=ON

View File

@@ -0,0 +1,5 @@
#!/bin/bash
set -ex
cmake --build bin --parallel -t BeamMP-Server-tests

View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -ex
cmake --build bin --parallel -t BeamMP-Server
objcopy --only-keep-debug bin/BeamMP-Server bin/BeamMP-Server.debug
objcopy --add-gnu-debuglink bin/BeamMP-Server bin/BeamMP-Server.debug
strip -s bin/BeamMP-Server

View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -ex
apt-get update -y
apt-get install -y liblua5.3-0 curl