Skip to content

Commit

Permalink
chore(CI): Make some changes. Less CI's maybe better...
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitzunu committed Nov 26, 2023
1 parent e68bd90 commit 040cc23
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 44 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/check_pending_sql.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: core
name: main-nopch
on:
push:
branches:
- 'master'
pull_request:
types: ['labeled', 'opened', 'synchronize', 'reopened']

concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
Expand All @@ -16,29 +15,15 @@ jobs:
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
include:
- os: ubuntu-20.04
compiler: clang12
- os: ubuntu-20.04
compiler: clang11
- os: ubuntu-20.04
compiler: gcc # default in 20.04 is gcc 9
- os: ubuntu-20.04
compiler: gcc10
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}
env:
COMPILER: ${{ matrix.compiler }}
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (
github.ref == 'refs/heads/master'
|| contains(github.event.pull_request.labels.*.name, 'file-cpp'
|| github.event.label.name == 'file-cpp'
|| contains(github.event.pull_request.labels.*.name, 'run-build')
|| github.event.label.name == 'run-build')
)
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
- name: Cache
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: main
name: main-pch
on:
push:
branches:
Expand All @@ -15,8 +15,8 @@ jobs:
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
os: [ubuntu-20.04]
compiler: [clang]
- os: ubuntu-20.04
compiler: clang12
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}
env:
Expand All @@ -37,7 +37,7 @@ jobs:
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf-core.sh
run: source ./apps/ci/ci-conf-core-pch.sh
- name: Process pending sql
run: bash bin/acore-db-pendings
- name: Build
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/core_modules_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
&& !github.event.pull_request.draft
&& (
github.ref == 'refs/heads/master'
|| contains(github.event.pull_request.labels.*.name, 'file-cpp'
|| github.event.label.name == 'file-cpp'
|| contains(github.event.pull_request.labels.*.name, 'run-build')
|| github.event.label.name == 'run-build')
)
Expand All @@ -56,9 +54,3 @@ jobs:
run: bash bin/acore-db-pendings
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run
run: source ./apps/ci/ci-dry-run.sh worldserver
- name: Check startup errors
run: source ./apps/ci/ci-error-check.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-db
name: db-sql
on:
push:
branches:
Expand All @@ -24,6 +24,8 @@ jobs:
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
- name: Check pending SQL
run: source ./apps/ci/ci-pending.sh
- name: Cache
uses: actions/cache@v3
env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
fail-fast: false
matrix:
os:
- macos-11
- macos-12
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tools_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.compiler }}
env:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
if: |
github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
&& (
contains(github.event.pull_request.labels.*.name, 'run-build')
|| github.event.label.name == 'run-build')
)
steps:
- uses: actions/checkout@v4
- name: Cache
Expand Down
69 changes: 69 additions & 0 deletions apps/ci/ci-conf-core-pch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

set -e

cat >>conf/config.sh <<CONFIG_SH
MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2))
CWARNINGS=ON
CDEBUG=OFF
CTYPE=Release
CTOOLS_BUILD=none
CSCRIPTS=static
CMODULES=static
CBUILD_TESTING=ON
CSCRIPTPCH=ON
CCOREPCH=ON
CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
CONFIG_SH

case $COMPILER in

# this is in order to use the "default" gcc version of the OS, without forcing a specific version
"gcc" )
time sudo apt-get install -y gcc g++
echo "CCOMPILERC=\"gcc\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++\"" >> ./conf/config.sh
;;

"gcc8" )
time sudo apt-get install -y gcc-8 g++-8
echo "CCOMPILERC=\"gcc-8\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-8\"" >> ./conf/config.sh
;;

"gcc10" )
time sudo apt-get install -y gcc-10 g++-10
echo "CCOMPILERC=\"gcc-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-10\"" >> ./conf/config.sh
;;

# this is in order to use the "default" clang version of the OS, without forcing a specific version
"clang" )
time sudo apt-get install -y clang
echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh
;;

"clang10" )
time sudo apt-get install -y clang-10
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
;;

"clang11" )
time sudo apt-get install -y clang-11
echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh
;;

"clang12" )
time sudo apt-get install -y clang-12
echo "CCOMPILERC=\"clang-12\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-12\"" >> ./conf/config.sh
;;

* )
echo "Unknown compiler $COMPILER"
exit 1
;;
esac

0 comments on commit 040cc23

Please # to comment.