mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-03 00:16:50 +00:00
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: CMake Linux Build
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
linux-build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Restore artifacts, or run vcpkg, build and cache artifacts
|
|
uses: lukka/run-vcpkg@v7
|
|
id: runvcpkg
|
|
with:
|
|
vcpkgArguments: 'zlib nlohmann-json openssl cpp-httplib[openssl]'
|
|
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
|
vcpkgGitCommitId: '40616a5e954f7be1077ef37db3fbddbd5dcd1ca6'
|
|
|
|
- name: Create Build Environment
|
|
run: cmake -E make_directory ${{github.workspace}}/build-linux
|
|
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{github.workspace}}/build-linux
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build-linux
|
|
shell: bash
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: BeamMP-Launcher
|
|
path: ${{github.workspace}}/build-linux/BeamMP-Launcher
|