GitHub Actions Refactor (#143)
* Split Linux and Windows into their own jobs * Implement Codestyling Check Script * It checks for whitespaces (tabs). * Fix some alignments.
This commit is contained in:
parent
b4e2348ef2
commit
c0411110cb
29
.github/workflows/core_build.yml
vendored
29
.github/workflows/core_build.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: core-build
|
name: Linux Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
@ -43,30 +43,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Mangos Project
|
- name: Build Mangos Project
|
||||||
run: source ./apps/ci/ci-compile.sh
|
run: source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
windows-build:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
runs-on: windows-2019
|
|
||||||
name: Windows Server 2019
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Configure Windows
|
|
||||||
run: choco install --no-progress openssl
|
|
||||||
|
|
||||||
- name: Checkout Submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git submodule init && git submodule update
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p build && cd build
|
|
||||||
cmake .. -DBUILD_TOOLS:BOOL=1 -DBUILD_MANGOSD:BOOL=1 -DBUILD_REALMD:BOOL=1 -DSOAP:BOOL=1 -DSCRIPT_LIB_ELUNA:BOOL=1 -DSCRIPT_LIB_SD3:BOOL=1 -DPLAYERBOTS:BOOL=1 -DUSE_STORMLIB:BOOL=1
|
|
||||||
cmake --build . --config Release --parallel 4
|
|
||||||
|
|
||||||
|
|
||||||
|
17
.github/workflows/core_codestyle.yml
vendored
Normal file
17
.github/workflows/core_codestyle.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Codestyle Checks
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-codestyle:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
name: Check Codestyling
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Check Codestyling
|
||||||
|
run: source ./apps/ci/ci-codestyle.sh
|
32
.github/workflows/core_windows_build.yml
vendored
Normal file
32
.github/workflows/core_windows_build.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Windows Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
runs-on: windows-2019
|
||||||
|
name: Windows Server 2019
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Configure Windows
|
||||||
|
run: choco install --no-progress openssl
|
||||||
|
|
||||||
|
- name: Checkout Submodules
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git submodule init && git submodule update
|
||||||
|
|
||||||
|
- name: Build Project
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake .. -DBUILD_TOOLS:BOOL=1 -DBUILD_MANGOSD:BOOL=1 -DBUILD_REALMD:BOOL=1 -DSOAP:BOOL=1 -DSCRIPT_LIB_ELUNA:BOOL=1 -DSCRIPT_LIB_SD3:BOOL=1 -DPLAYERBOTS:BOOL=1 -DUSE_STORMLIB:BOOL=1
|
||||||
|
cmake --build . --config Release --parallel 4
|
25
apps/ci/ci-codestyle.sh
Normal file
25
apps/ci/ci-codestyle.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starting Codestyling Script:"
|
||||||
|
echo "Checking for whitespaces:"
|
||||||
|
echo
|
||||||
|
|
||||||
|
declare -A singleLineRegexChecks=(
|
||||||
|
["[[:blank:]]$"]="Remove whitespace at the end of the lines above"
|
||||||
|
["\t"]="Replace tabs with 4 spaces in the lines above"
|
||||||
|
)
|
||||||
|
|
||||||
|
for check in ${!singleLineRegexChecks[@]}; do
|
||||||
|
echo " Checking RegEx: '${check}'"
|
||||||
|
|
||||||
|
if grep -P -r -I -n ${check} src; then
|
||||||
|
echo
|
||||||
|
echo "${singleLineRegexChecks[$check]}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Awesome! No issues..."
|
Loading…
x
Reference in New Issue
Block a user