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: jobs:
build: build:
strategy: runs-on: ubuntu-latest
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 }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -36,10 +18,13 @@ jobs:
run: sudo apt-get update -y run: sudo apt-get update -y
- name: Install Required Packages - 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 - name: Check for Submodule Updates
run: source ./apps/ci/ci-submodule-update.sh run: source ./apps/ci/ci-submodule-update.sh
- name: Build Mangos Project - name: Build Mangos Project
run: source ./apps/ci/ci-compile.sh run: source ./apps/ci/ci-compile.sh

View File

@ -9,21 +9,21 @@ jobs:
build: build:
strategy: strategy:
fail-fast: false fail-fast: false
runs-on: windows-2019 runs-on: windows-2019
name: Windows Server 2019 name: Windows Server 2019
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Configure Windows - name: Configure Windows
run: choco install --no-progress openssl run: choco install --no-progress openssl
- name: Checkout Submodules - name: Checkout Submodules
shell: bash shell: bash
run: | run: |
git submodule init && git submodule update git submodule init && git submodule update
- name: Build Project - name: Build Project
shell: bash shell: bash
run: | run: |

View File

@ -3,7 +3,6 @@
set -e set -e
echo "Starting Codestyling Script:" echo "Starting Codestyling Script:"
echo "Checking for whitespaces:"
echo echo
declare -A singleLineRegexChecks=( declare -A singleLineRegexChecks=(
@ -21,5 +20,20 @@ for check in ${!singleLineRegexChecks[@]}; do
fi fi
done 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
echo "Awesome! No issues..." echo "Awesome! No issues..."

View File

@ -3,17 +3,14 @@
set -e set -e
# Check for & make directories # Check for & make directories
test -d _build || mkdir _build time test -d _build || mkdir _build
test -d _install || mkdir _install time test -d _install || mkdir _install
# Move to build folder # Move to build folder
cd _build time cd _build
# Run CMake Configurations # 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/ 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
# Check OpenSSL
which openssl
# Compile the Project # 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