mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-17 16:57:11 +00:00
44 lines
1.4 KiB
YAML
44 lines
1.4 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
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Restore artifacts, or run vcpkg, build and cache artifacts
|
|
uses: lukka/run-vcpkg@v7
|
|
id: runvcpkg
|
|
with:
|
|
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook'
|
|
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
|
vcpkgGitCommitId: 'b33f616f85e207012aa8229706d8e603efd5794d'
|
|
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
|
|
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 --target BeamMP-Launcher
|
|
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: BeamMP-Launcher.exe
|
|
path: ${{github.workspace}}/build-windows/Release/BeamMP-Launcher.exe
|