mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-02-16 10:00:41 +00:00
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
name: CMake Windows Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [opened, reopened]
|
|
pull_request_review:
|
|
types: [submitted]
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
windows-build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Restore artifacts, or run vcpkg, build and cache artifacts
|
|
uses: lukka/run-vcpkg@v7
|
|
id: runvcpkg
|
|
with:
|
|
vcpkgArguments: "lua zlib rapidjson openssl websocketpp curl"
|
|
vcpkgDirectory: "${{ runner.workspace }}/b/vcpkg"
|
|
vcpkgGitCommitId: "a106de33bbee694e3be6243718aa2a549a692832"
|
|
vcpkgTriplet: "x64-windows-static"
|
|
|
|
- name: Create Build Environment
|
|
run: cmake -E make_directory ${{github.workspace}}/build-windows
|
|
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{github.workspace}}/build-windows
|
|
env:
|
|
beammp_sentry_url: ${{ secrets.BEAMMP_SECRET_SENTRY_URL }}
|
|
run: cmake $GITHUB_WORKSPACE -DSENTRY_BACKEND=breakpad -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake' -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBEAMMP_SECRET_SENTRY_URL="$beammp_sentry_url"
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build-windows
|
|
shell: bash
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: BeamMP-Server.exe
|
|
path: ${{github.workspace}}/build-windows/Release/BeamMP-Server.exe
|
|
|
|
- name: Build debug
|
|
working-directory: ${{github.workspace}}/build-windows
|
|
shell: bash
|
|
run: |
|
|
cmake --build . --config Debug
|
|
|
|
- name: Archive debug artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: BeamMP-Server-debug.exe
|
|
path: ${{github.workspace}}/build-windows/Debug/BeamMP-Server.exe
|