Skip to content

Commit 3befc84

Browse files
authored
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.
2 parents 6f196ac + 48a77e9 commit 3befc84

8 files changed

Lines changed: 70 additions & 19 deletions

File tree

.github/workflows/linux.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Linux
33
on:
44
push:
55
branches:
6-
- 'develop'
7-
- 'minor'
6+
- "develop"
7+
- "minor"
88
pull_request:
99

10-
env:
10+
env:
1111
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
1212
VCPKG_FORCE_SYSTEM_BINARIES: 1
1313
CMAKE_BUILD_TYPE: "Release"
@@ -21,6 +21,8 @@ jobs:
2121
include:
2222
- distro: debian
2323
version: 12
24+
- distro: debian
25+
version: 13
2426
- distro: ubuntu
2527
version: 22.04
2628
- distro: ubuntu
@@ -30,7 +32,7 @@ jobs:
3032
steps:
3133
- name: get-cmake
3234
uses: lukka/get-cmake@v3.28.1
33-
35+
3436
- name: Export GitHub Actions cache environment variables
3537
uses: actions/github-script@v6
3638
with:
@@ -45,7 +47,7 @@ jobs:
4547
4648
- uses: actions/checkout@v2
4749
with:
48-
submodules: 'recursive'
50+
submodules: "recursive"
4951
fetch-depth: 0
5052

5153
- name: Git config safe directory
@@ -91,6 +93,8 @@ jobs:
9193
include:
9294
- distro: debian
9395
version: 12
96+
- distro: debian
97+
version: 13
9498
- distro: ubuntu
9599
version: 22.04
96100
- distro: ubuntu
@@ -100,7 +104,7 @@ jobs:
100104
steps:
101105
- name: get-cmake
102106
uses: lukka/get-cmake@v3.28.1
103-
107+
104108
- name: Export GitHub Actions cache environment variables
105109
uses: actions/github-script@v6
106110
with:
@@ -115,7 +119,7 @@ jobs:
115119
116120
- uses: actions/checkout@v2
117121
with:
118-
submodules: 'recursive'
122+
submodules: "recursive"
119123
fetch-depth: 0
120124

121125
- name: Git config safe directory
@@ -151,4 +155,3 @@ jobs:
151155

152156
- name: Test
153157
run: ./bin/BeamMP-Server-tests
154-

.github/workflows/release.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
# Sequence of patterns matched against refs/tags
55
tags:
6-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
77

88
env:
99
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
@@ -14,8 +14,8 @@ jobs:
1414
create-release:
1515
runs-on: ubuntu-latest
1616
name: Create Release
17-
outputs:
18-
upload_url: ${{ steps.create_release.outputs.upload_url }}
17+
outputs:
18+
upload_url: ${{ steps.create_release.outputs.upload_url }}
1919
steps:
2020
- name: Create Release
2121
id: create_release
@@ -40,6 +40,8 @@ jobs:
4040
include:
4141
- distro: debian
4242
version: 12
43+
- distro: debian
44+
version: 13
4345
- distro: ubuntu
4446
version: 22.04
4547
- distro: ubuntu
@@ -49,7 +51,7 @@ jobs:
4951
steps:
5052
- name: get-cmake
5153
uses: lukka/get-cmake@v3.28.1
52-
54+
5355
- name: Export GitHub Actions cache environment variables
5456
uses: actions/github-script@v6
5557
with:
@@ -64,7 +66,7 @@ jobs:
6466
6567
- uses: actions/checkout@v2
6668
with:
67-
submodules: 'recursive'
69+
submodules: "recursive"
6870
fetch-depth: 0
6971

7072
- name: Git config safe directory
@@ -81,7 +83,7 @@ jobs:
8183
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh
8284

8385
- name: Upload Release Asset
84-
id: upload-release-asset
86+
id: upload-release-asset
8587
uses: actions/upload-release-asset@v1
8688
env:
8789
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -110,6 +112,8 @@ jobs:
110112
include:
111113
- distro: debian
112114
version: 12
115+
- distro: debian
116+
version: 13
113117
- distro: ubuntu
114118
version: 22.04
115119
- distro: ubuntu
@@ -122,7 +126,7 @@ jobs:
122126
steps:
123127
- name: get-cmake
124128
uses: lukka/get-cmake@v3.28.1
125-
129+
126130
- name: Export GitHub Actions cache environment variables
127131
uses: actions/github-script@v6
128132
with:
@@ -137,7 +141,7 @@ jobs:
137141
138142
- uses: actions/checkout@v2
139143
with:
140-
submodules: 'recursive'
144+
submodules: "recursive"
141145
fetch-depth: 0
142146

143147
- name: Git config safe directory
@@ -154,7 +158,7 @@ jobs:
154158
run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh
155159

156160
- name: Upload Release Asset
157-
id: upload-release-asset
161+
id: upload-release-asset
158162
uses: actions/upload-release-asset@v1
159163
env:
160164
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -191,7 +195,7 @@ jobs:
191195
192196
- uses: actions/checkout@v2
193197
with:
194-
submodules: 'recursive'
198+
submodules: "recursive"
195199
fetch-depth: 0
196200

197201
- name: Create Build Environment
@@ -203,7 +207,7 @@ jobs:
203207
run: bash ./scripts/windows/2-build.sh
204208

205209
- name: Upload Release Asset
206-
id: upload-release-asset
210+
id: upload-release-asset
207211
uses: actions/upload-release-asset@v1
208212
env:
209213
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
apt-get update -y
6+
7+
apt-get install -y liblua5.3-0 liblua5.3-dev curl zip unzip tar cmake make git g++ ninja-build

scripts/debian-13/1.5-git-safe.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
git config --global --add safe.directory $(pwd)
6+
git config --global --add safe.directory $(pwd)/vcpkg
7+
git config --global --add safe.directory $(pwd)/deps/commandline

scripts/debian-13/2-configure.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
./vcpkg/bootstrap-vcpkg.sh
6+
7+
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

scripts/debian-13/3-build-tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
cmake --build bin --parallel -t BeamMP-Server-tests

scripts/debian-13/3-build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
cmake --build bin --parallel -t BeamMP-Server
6+
7+
objcopy --only-keep-debug bin/BeamMP-Server bin/BeamMP-Server.debug
8+
objcopy --add-gnu-debuglink bin/BeamMP-Server bin/BeamMP-Server.debug
9+
10+
strip -s bin/BeamMP-Server
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
apt-get update -y
6+
7+
apt-get install -y liblua5.3-0 curl
8+

0 commit comments

Comments
 (0)