diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..15e775c --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,31 @@ +name: Windows + +on: [push] + +jobs: + windows-build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + with: + runVcpkgInstall: true + + - name: Create Build Environment + shell: bash + run: ./scripts/windows/1-configure.sh '-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake' + + - name: Build Server + shell: bash + run: bash ./scripts/windows/2-build.sh + + - name: Archive server artifact + uses: actions/upload-artifact@v2 + with: + name: BeamMP-Server-windows + path: ./bin/BeamMP-Server.exe + diff --git a/scripts/windows/1-configure.sh b/scripts/windows/1-configure.sh new file mode 100644 index 0000000..0f58888 --- /dev/null +++ b/scripts/windows/1-configure.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake . -B bin $1 -DCMAKE_BUILD_TYPE=Release -DBeamMP-Server_ENABLE_LTO=ON diff --git a/scripts/windows/2-build-tests.sh b/scripts/windows/2-build-tests.sh new file mode 100755 index 0000000..aa68e15 --- /dev/null +++ b/scripts/windows/2-build-tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server-tests diff --git a/scripts/windows/2-build.sh b/scripts/windows/2-build.sh new file mode 100755 index 0000000..28fee9b --- /dev/null +++ b/scripts/windows/2-build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server