From 23e9941704af79d4d1497a74702437eb057ace2f Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 14 Sep 2022 20:42:25 +0200 Subject: [PATCH] update linux and windows workflows to run on pr open, reopen, review submit --- .github/workflows/cmake-linux.yml | 15 ++++++++++----- .github/workflows/cmake-windows.yml | 24 ++++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake-linux.yml b/.github/workflows/cmake-linux.yml index 802b4ac..e624f72 100644 --- a/.github/workflows/cmake-linux.yml +++ b/.github/workflows/cmake-linux.yml @@ -1,6 +1,11 @@ name: CMake Linux Build -on: [push] +on: + push: + pull_request: + types: [opened, reopened] + pull_request_review: + types: [submitted] env: BUILD_TYPE: Release @@ -63,16 +68,16 @@ jobs: with: name: BeamMP-Server-linux-tests path: ${{github.workspace}} - + - name: Install Runtime Dependencies shell: bash run: | sudo apt-get update - sudo apt-get install -y liblua5.3 openssl + sudo apt-get install -y liblua5.3 openssl - name: Test working-directory: ${{github.workspace}} shell: bash run: | - chmod +x ./BeamMP-Server-tests - ./BeamMP-Server-tests + chmod +x ./BeamMP-Server-tests + ./BeamMP-Server-tests diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index b882766..e0be5ee 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -1,6 +1,11 @@ name: CMake Windows Build -on: [push] +on: + push: + pull_request: + types: [opened, reopened] + pull_request_review: + types: [submitted] env: BUILD_TYPE: Release @@ -8,20 +13,20 @@ env: jobs: windows-build: runs-on: windows-latest - + steps: - uses: actions/checkout@v2 with: - submodules: 'recursive' - + 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' + 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 @@ -49,10 +54,9 @@ jobs: 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 -