feat(CI): C++20 build (#8952)
This commit is contained in:
parent
c91959bba9
commit
dd79b7f63f
45
.github/workflows/cpp20.yml
vendored
Normal file
45
.github/workflows/cpp20.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: C++20
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
name: C++20
|
||||
env:
|
||||
COMPILER: clang
|
||||
ENABLE_CPP_20: 1
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: var/ccache
|
||||
key: ccache:C++20:${{ github.ref }}:${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache:C++20:${{ github.ref }}
|
||||
ccache:C++20
|
||||
- name: Configure OS
|
||||
run: source ./acore.sh install-deps
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
- name: Create conf/config.sh
|
||||
run: source ./apps/ci/ci-conf.sh
|
||||
- name: Import db
|
||||
run: source ./apps/ci/ci-import-db.sh
|
||||
- name: Build
|
||||
run: source ./apps/ci/ci-compile.sh
|
||||
- name: Dry run
|
||||
run: source ./apps/ci/ci-worldserver-dry-run.sh
|
||||
- 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
|
||||
@ -19,6 +19,10 @@ DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||
CONFIG_SH
|
||||
|
||||
if [[ $ENABLE_CPP_20 -eq 1 ]]; then
|
||||
echo "CUSE_CPP_20=ON" >> ./conf/config.sh
|
||||
fi
|
||||
|
||||
case $COMPILER in
|
||||
|
||||
# this is in order to use the "default" gcc version of the OS, without forcing a specific version
|
||||
|
||||
@ -67,9 +67,18 @@ function comp_configure() {
|
||||
|
||||
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
|
||||
-DSCRIPTS=$CSCRIPTS \
|
||||
-DUSE_CPP_20=$CUSE_CPP_20 \
|
||||
-DBUILD_TESTING=$CBUILD_TESTING \
|
||||
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
|
||||
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
|
||||
-DTOOLS=$CTOOLS \
|
||||
-DUSE_SCRIPTPCH=$CSCRIPTPCH \
|
||||
-DUSE_COREPCH=$CCOREPCH \
|
||||
-DWITH_COREDEBUG=$CDEBUG \
|
||||
-DCMAKE_BUILD_TYPE=$CTYPE \
|
||||
-DWITH_WARNINGS=$CWARNINGS \
|
||||
-DCMAKE_C_COMPILER=$CCOMPILERC \
|
||||
-DCMAKE_CXX_COMPILER=$CCOMPILERCXX \
|
||||
"-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" \
|
||||
$CCUSTOMOPTIONS
|
||||
|
||||
cd $CWD
|
||||
|
||||
|
||||
2
conf/dist/config.sh
vendored
2
conf/dist/config.sh
vendored
@ -80,6 +80,8 @@ CTOOLS=${CTOOLS:-OFF}
|
||||
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
|
||||
CSCRIPTPCH=${CSCRIPTPCH:-ON}
|
||||
CCOREPCH=${CCOREPCH:-ON}
|
||||
# compile with C++20
|
||||
CUSE_CPP_20=${CUSE_CPP_20:-OFF}
|
||||
|
||||
# Skip specific modules from compilation (cmake reconfigure needed)
|
||||
# use semicolon ; to separate modules
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user