Skip to content

Commit

Permalink
add windows build step
Browse files Browse the repository at this point in the history
  • Loading branch information
lionkor committed Dec 5, 2023
1 parent 4708484 commit bd923ac
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -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

5 changes: 5 additions & 0 deletions scripts/windows/1-configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -ex

cmake . -B bin $1 -DCMAKE_BUILD_TYPE=Release -DBeamMP-Server_ENABLE_LTO=ON
5 changes: 5 additions & 0 deletions scripts/windows/2-build-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -ex

cmake --build bin --parallel -t BeamMP-Server-tests
5 changes: 5 additions & 0 deletions scripts/windows/2-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -ex

cmake --build bin --parallel -t BeamMP-Server

0 comments on commit bd923ac

Please sign in to comment.