diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index db82fbcc..15e28d09 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -7,25 +7,7 @@ on: jobs: build: - strategy: - fail-fast: false - - matrix: - compiler: [gcc, clang] - - include: - - os: ubuntu-20.04 - name: Ubuntu 20.04 GCC - compiler: gcc - - - os: ubuntu-20.04 - name: Ubuntu 20.04 Clang - compiler: clang - - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} - env: - compiler: ${{ matrix.compiler }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -36,10 +18,13 @@ jobs: run: sudo apt-get update -y - name: Install Required Packages - run: sudo apt-get install -y git make cmake gcc g++ clang libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-6.4.5 libace-dev python + run: sudo apt-get install -y git make cmake clang libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-dev + + - name: Update Compilers + run: source ./apps/ci/ci-compiler-update.sh - name: Check for Submodule Updates run: source ./apps/ci/ci-submodule-update.sh - + - name: Build Mangos Project run: source ./apps/ci/ci-compile.sh diff --git a/.github/workflows/core_windows_build.yml b/.github/workflows/core_windows_build.yml index 7f4c9601..59b8a6dd 100644 --- a/.github/workflows/core_windows_build.yml +++ b/.github/workflows/core_windows_build.yml @@ -9,21 +9,21 @@ 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: | + run: | git submodule init && git submodule update - + - name: Build Project shell: bash run: | diff --git a/apps/ci/ci-codestyle.sh b/apps/ci/ci-codestyle.sh index b5ac505d..ca9deab3 100644 --- a/apps/ci/ci-codestyle.sh +++ b/apps/ci/ci-codestyle.sh @@ -3,7 +3,6 @@ set -e echo "Starting Codestyling Script:" -echo "Checking for whitespaces:" echo declare -A singleLineRegexChecks=( @@ -21,5 +20,20 @@ for check in ${!singleLineRegexChecks[@]}; do fi done +# declare -A multiLineRegexChecks=( +# ["\n\n\n"]="Multiple blank lines detected, keep only one. Check the files above" +# ) + +# for check in ${!multiLineRegexChecks[@]}; do +# echo " Checking RegEx: '${check}'" + +# if grep -Pzo -r -I ${check} src; then +# echo +# echo +# echo "${multiLineRegexChecks[$check]}" +# exit 1 +# fi +# done + echo echo "Awesome! No issues..." diff --git a/apps/ci/ci-compile.sh b/apps/ci/ci-compile.sh index e874ebd7..a8669e58 100644 --- a/apps/ci/ci-compile.sh +++ b/apps/ci/ci-compile.sh @@ -3,17 +3,14 @@ set -e # Check for & make directories -test -d _build || mkdir _build -test -d _install || mkdir _install +time test -d _build || mkdir _build +time test -d _install || mkdir _install # Move to build folder -cd _build +time cd _build # Run CMake Configurations -cmake .. -DCMAKE_INSTALL_PREFIX=../_install -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 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ - -# Check OpenSSL -which openssl +time cmake .. -DCMAKE_INSTALL_PREFIX=../_install -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 # Compile the Project -make -j 6 +time make -j 6 diff --git a/apps/ci/ci-compiler-update.sh b/apps/ci/ci-compiler-update.sh new file mode 100644 index 00000000..f281f376 --- /dev/null +++ b/apps/ci/ci-compiler-update.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +# Update to Clang Compilers +time sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 +time sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100 diff --git a/apps/whitespace_remover/whitespace_remover.sh b/apps/whitespace_remover/whitespace_remover.sh new file mode 100755 index 00000000..fe3aeea6 --- /dev/null +++ b/apps/whitespace_remover/whitespace_remover.sh @@ -0,0 +1,7 @@ +# Required files +find -name '*.cpp' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i +find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i + +# Optional files - uncomment lines below to add them. +#find -name '*.txt' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i +#find -name '*.cmake' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i