update linux and windows workflows to run on pr open, reopen, review submit

This commit is contained in:
Lion Kortlepel 2022-09-14 20:42:25 +02:00
parent 469eb78c80
commit 23e9941704
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 24 additions and 15 deletions

View File

@ -1,6 +1,11 @@
name: CMake Linux Build name: CMake Linux Build
on: [push] on:
push:
pull_request:
types: [opened, reopened]
pull_request_review:
types: [submitted]
env: env:
BUILD_TYPE: Release BUILD_TYPE: Release
@ -63,16 +68,16 @@ jobs:
with: with:
name: BeamMP-Server-linux-tests name: BeamMP-Server-linux-tests
path: ${{github.workspace}} path: ${{github.workspace}}
- name: Install Runtime Dependencies - name: Install Runtime Dependencies
shell: bash shell: bash
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y liblua5.3 openssl sudo apt-get install -y liblua5.3 openssl
- name: Test - name: Test
working-directory: ${{github.workspace}} working-directory: ${{github.workspace}}
shell: bash shell: bash
run: | run: |
chmod +x ./BeamMP-Server-tests chmod +x ./BeamMP-Server-tests
./BeamMP-Server-tests ./BeamMP-Server-tests

View File

@ -1,6 +1,11 @@
name: CMake Windows Build name: CMake Windows Build
on: [push] on:
push:
pull_request:
types: [opened, reopened]
pull_request_review:
types: [submitted]
env: env:
BUILD_TYPE: Release BUILD_TYPE: Release
@ -8,20 +13,20 @@ env:
jobs: jobs:
windows-build: windows-build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: 'recursive' submodules: "recursive"
- name: Restore artifacts, or run vcpkg, build and cache artifacts - name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@v7 uses: lukka/run-vcpkg@v7
id: runvcpkg id: runvcpkg
with: with:
vcpkgArguments: 'lua zlib rapidjson openssl websocketpp curl' vcpkgArguments: "lua zlib rapidjson openssl websocketpp curl"
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' vcpkgDirectory: "${{ runner.workspace }}/b/vcpkg"
vcpkgGitCommitId: 'a106de33bbee694e3be6243718aa2a549a692832' vcpkgGitCommitId: "a106de33bbee694e3be6243718aa2a549a692832"
vcpkgTriplet: 'x64-windows-static' vcpkgTriplet: "x64-windows-static"
- name: Create Build Environment - name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build-windows run: cmake -E make_directory ${{github.workspace}}/build-windows
@ -49,10 +54,9 @@ jobs:
shell: bash shell: bash
run: | run: |
cmake --build . --config Debug cmake --build . --config Debug
- name: Archive debug artifacts - name: Archive debug artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: BeamMP-Server-debug.exe name: BeamMP-Server-debug.exe
path: ${{github.workspace}}/build-windows/Debug/BeamMP-Server.exe path: ${{github.workspace}}/build-windows/Debug/BeamMP-Server.exe