mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-22 12:13:26 +00:00
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
name: CMake Windows Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
windows-build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Restore artifacts, or run vcpkg, build and cache artifacts
|
|
uses: lukka/run-vcpkg@main
|
|
id: runvcpkg
|
|
with:
|
|
vcpkgArguments: 'lua zlib rapidjson boost-beast boost-asio openssl'
|
|
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
|
vcpkgGitCommitId: '30124253eecff36bc90f73341edbfb4f845e2a1e'
|
|
vcpkgTriplet: 'x64-windows-static'
|
|
appendedCacheKey: ${{ hashFiles( '**/vcpkg_manifest/vcpkg.json' ) }}
|
|
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
|
|
|
|
- name: Create Build Environment
|
|
run: cmake -E make_directory ${{github.workspace}}/build-windows
|
|
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{github.workspace}}/build-windows
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake' -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build-windows
|
|
shell: bash
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|