diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1b28310..a2f2d1e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,11 +3,11 @@ name: Linux on: push: branches: - - 'develop' - - 'minor' + - "develop" + - "minor" pull_request: -env: +env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_FORCE_SYSTEM_BINARIES: 1 CMAKE_BUILD_TYPE: "Release" @@ -21,6 +21,8 @@ jobs: include: - distro: debian version: 12 + - distro: debian + version: 13 - distro: ubuntu version: 22.04 - distro: ubuntu @@ -30,7 +32,7 @@ jobs: steps: - name: get-cmake uses: lukka/get-cmake@v3.28.1 - + - name: Export GitHub Actions cache environment variables uses: actions/github-script@v6 with: @@ -45,7 +47,7 @@ jobs: - uses: actions/checkout@v2 with: - submodules: 'recursive' + submodules: "recursive" fetch-depth: 0 - name: Git config safe directory @@ -91,6 +93,8 @@ jobs: include: - distro: debian version: 12 + - distro: debian + version: 13 - distro: ubuntu version: 22.04 - distro: ubuntu @@ -100,7 +104,7 @@ jobs: steps: - name: get-cmake uses: lukka/get-cmake@v3.28.1 - + - name: Export GitHub Actions cache environment variables uses: actions/github-script@v6 with: @@ -115,7 +119,7 @@ jobs: - uses: actions/checkout@v2 with: - submodules: 'recursive' + submodules: "recursive" fetch-depth: 0 - name: Git config safe directory @@ -151,4 +155,3 @@ jobs: - name: Test run: ./bin/BeamMP-Server-tests - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff401e2..a57ffc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ on: push: # Sequence of patterns matched against refs/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: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" @@ -14,8 +14,8 @@ jobs: create-release: runs-on: ubuntu-latest name: Create Release - outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - name: Create Release id: create_release @@ -40,6 +40,8 @@ jobs: include: - distro: debian version: 12 + - distro: debian + version: 13 - distro: ubuntu version: 22.04 - distro: ubuntu @@ -49,7 +51,7 @@ jobs: steps: - name: get-cmake uses: lukka/get-cmake@v3.28.1 - + - name: Export GitHub Actions cache environment variables uses: actions/github-script@v6 with: @@ -64,7 +66,7 @@ jobs: - uses: actions/checkout@v2 with: - submodules: 'recursive' + submodules: "recursive" fetch-depth: 0 - name: Git config safe directory @@ -81,7 +83,7 @@ jobs: run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -110,6 +112,8 @@ jobs: include: - distro: debian version: 12 + - distro: debian + version: 13 - distro: ubuntu version: 22.04 - distro: ubuntu @@ -122,7 +126,7 @@ jobs: steps: - name: get-cmake uses: lukka/get-cmake@v3.28.1 - + - name: Export GitHub Actions cache environment variables uses: actions/github-script@v6 with: @@ -137,7 +141,7 @@ jobs: - uses: actions/checkout@v2 with: - submodules: 'recursive' + submodules: "recursive" fetch-depth: 0 - name: Git config safe directory @@ -154,7 +158,7 @@ jobs: run: bash ./scripts/${{ matrix.distro }}-${{ matrix.version }}/3-build.sh - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -191,7 +195,7 @@ jobs: - uses: actions/checkout@v2 with: - submodules: 'recursive' + submodules: "recursive" fetch-depth: 0 - name: Create Build Environment @@ -203,7 +207,7 @@ jobs: run: bash ./scripts/windows/2-build.sh - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/debian-13/1-install-deps.sh b/scripts/debian-13/1-install-deps.sh new file mode 100644 index 0000000..49345d0 --- /dev/null +++ b/scripts/debian-13/1-install-deps.sh @@ -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 diff --git a/scripts/debian-13/1.5-git-safe.sh b/scripts/debian-13/1.5-git-safe.sh new file mode 100644 index 0000000..0ffc84f --- /dev/null +++ b/scripts/debian-13/1.5-git-safe.sh @@ -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 \ No newline at end of file diff --git a/scripts/debian-13/2-configure.sh b/scripts/debian-13/2-configure.sh new file mode 100644 index 0000000..b75a029 --- /dev/null +++ b/scripts/debian-13/2-configure.sh @@ -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 diff --git a/scripts/debian-13/3-build-tests.sh b/scripts/debian-13/3-build-tests.sh new file mode 100644 index 0000000..aa68e15 --- /dev/null +++ b/scripts/debian-13/3-build-tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server-tests diff --git a/scripts/debian-13/3-build.sh b/scripts/debian-13/3-build.sh new file mode 100644 index 0000000..4671942 --- /dev/null +++ b/scripts/debian-13/3-build.sh @@ -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 diff --git a/scripts/debian-13/4-install-runtime-deps.sh b/scripts/debian-13/4-install-runtime-deps.sh new file mode 100644 index 0000000..e3a40b8 --- /dev/null +++ b/scripts/debian-13/4-install-runtime-deps.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -ex + +apt-get update -y + +apt-get install -y liblua5.3-0 curl +