diff --git a/.github/workflows/cmake-linux.yml b/.github/workflows/cmake-linux.yml new file mode 100644 index 0000000..d96b2cb --- /dev/null +++ b/.github/workflows/cmake-linux.yml @@ -0,0 +1,30 @@ +name: CMake Linux Build + +on: [push, pull_request] + +env: + BUILD_TYPE: Release + +jobs: + linux-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get install -y libz-dev rapidjson-dev libcurl4-openssl-dev liblua5.3 + + - 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_CXX_COMPILER=g++-10 + + - name: Build + working-directory: ${{github.workspace}}/build-linux + shell: bash + run: cmake --build . --config $BUILD_TYPE + diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml new file mode 100644 index 0000000..014aea7 --- /dev/null +++ b/.github/workflows/cmake-windows.yml @@ -0,0 +1,38 @@ +name: CMake Windows Build + +on: [push, pull_request] + +env: + BUILD_TYPE: Release + +jobs: + windows-build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + + - name: Restore artifacts, or run vcpkg, build and cache artifacts + uses: lukka/run-vcpkg@main + id: runvcpkg + with: + vcpkgArguments: 'lua zlib rapidjson curl' + vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' + vcpkgGitCommitId: '30124253eecff36bc90f73341edbfb4f845e2a1e' + 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 + diff --git a/README.md b/README.md index 5d23367..984a683 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # BeamMP-Server +![CMake Windows Build](https://github.com/lionkor/BeamMP-Server/workflows/CMake%20Windows%20Build/badge.svg?branch=master) +![CMake Linux Build](https://github.com/lionkor/BeamMP-Server/workflows/CMake%20Linux%20Build/badge.svg?branch=master) + The Server is the way we link client to each other and handle authentication, compression, and data management. It also allows lua plugins, that system is always being reviewed and improved with detailed instructions on wiki.beammp.com. ## Supported Operating Systems