Make all workflows the same on all projects (#176)

This commit is contained in:
Meltie2013 2022-03-25 09:57:36 -05:00 committed by GitHub
parent ab95cdfc56
commit 9e93176aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 36 deletions

View File

@ -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,7 +18,10 @@ 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

View File

@ -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..."

View File

@ -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

View File

@ -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

View File

@ -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