From 6b31ba35fde27d483ca41e751a135643c1178071 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 19:18:33 +0100 Subject: [PATCH 1/6] attempt to fix workflows to make release builds --- .github/workflows/linux.yml | 3 ++- .github/workflows/release.yml | 3 ++- .github/workflows/windows.yml | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index aea5f18..9b7de8c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -4,6 +4,7 @@ on: [push] env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + CMAKE_BUILD_TYPE: "Release" jobs: debian-11-build: @@ -147,4 +148,4 @@ jobs: - name: Test run: | chmod +x ./BeamMP-Server-tests - ./BeamMP-Server-tests \ No newline at end of file + ./BeamMP-Server-tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b607a5..aa8ab5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + CMAKE_BUILD_TYPE: "Release" jobs: create-release: @@ -165,4 +166,4 @@ jobs: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ./bin/BeamMP-Server.exe asset_name: BeamMP-Server.exe - asset_content_type: application/vnd.microsoft.portable-executable \ No newline at end of file + asset_content_type: application/vnd.microsoft.portable-executable diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c7e6450..bdb54b6 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,6 +5,7 @@ on: [push] env: VCPKG_DEFAULT_TRIPLET: x64-windows-static VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + CMAKE_BUILD_TYPE: "Release" jobs: windows-build: From 7f11d0f002fa9a154e9b0f862943f3053ec56808 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 19:21:52 +0100 Subject: [PATCH 2/6] make release builds by default --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00f2236..a87bb37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,9 +126,10 @@ include(FindThreads) # enables compile_commands.json for clang-related tools (such as the clang LS) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -# build debug builds by default (if not specified otherwise) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug") +# build release builds by default (if not specified otherwise) +if(NOT DEFINED CMAKE_BUILD_TYPE) + message(NOTICE "No build type specified, defaulting to 'Release'") + set(CMAKE_BUILD_TYPE "Release") endif() if(UNIX) From 5523a4fe4b6756589c7049c97530e4981ac59dcc Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 20:00:33 +0100 Subject: [PATCH 3/6] force build release config on windows --- scripts/windows/2-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/windows/2-build.sh b/scripts/windows/2-build.sh index 28fee9b..9512410 100755 --- a/scripts/windows/2-build.sh +++ b/scripts/windows/2-build.sh @@ -2,4 +2,4 @@ set -ex -cmake --build bin --parallel -t BeamMP-Server +cmake --build bin --parallel -t BeamMP-Server --config Release From 9f01268538b3fb37146c746647b9505ff0e7d2e5 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 20:01:53 +0100 Subject: [PATCH 4/6] update version to 3.1.3 --- include/Common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/Common.h b/include/Common.h index 6df1615..47b0812 100644 --- a/include/Common.h +++ b/include/Common.h @@ -135,7 +135,7 @@ private: static inline std::mutex mShutdownHandlersMutex {}; static inline std::deque mShutdownHandlers {}; - static inline Version mVersion { 3, 1, 2 }; + static inline Version mVersion { 3, 1, 3 }; }; std::string ThreadName(bool DebugModeOverride = false); From c6f78c5522af38aa30194681ea1accf28812b6bb Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 20:06:50 +0100 Subject: [PATCH 5/6] fix release build path --- .github/workflows/release.yml | 2 +- .github/workflows/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa8ab5f..47b7100 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,6 +164,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ./bin/BeamMP-Server.exe + asset_path: ./bin/Release/BeamMP-Server.exe asset_name: BeamMP-Server.exe asset_content_type: application/vnd.microsoft.portable-executable diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bdb54b6..f33ed92 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -39,5 +39,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: BeamMP-Server-windows - path: ./bin/BeamMP-Server.exe + path: ./bin/Release/BeamMP-Server.exe From 9f87edc6e9a7fbb4ab376c06e9923bd16f4eaea0 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 20:09:56 +0100 Subject: [PATCH 6/6] add msvcp140.dll comment to the release text --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47b7100..1105fd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: prerelease: true body: | Files included in this release: - - `BeamMP-Server.exe` is the windows build. + - `BeamMP-Server.exe` is the windows build. You need to install the [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe) to run this. - `BeamMP-Server-debian` is a Debian 11 build, requires `liblua5.3-0`. - `BeamMP-Server-ubuntu` is a Ubuntu 22.04 build, requires `liblua5.3-0`.