mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
chore(CI): Make some changes (#17861)
* chore(CI): Make some changes. Less CI's maybe better... * pendingsql * FORK TEST - TO BE REVERTED * changes * test * fix * Revert "FORK TEST - TO BE REVERTED" This reverts commit 875bc281c5a355cce2ddd8015484e256dbc185cf. * rename workflow * rename workflow * rename workflow * rename workflow * I argue windows don't need dry runs * maybe mac wants to be alive. who knows. When do we drop mac support really...?
This commit is contained in:
49
.github/workflows/build_dbimport.yml
vendored
49
.github/workflows/build_dbimport.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: build-db
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master' # only default branch
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# the result of the matrix will be the combination of all attributes, so we get os*compiler*modules builds
|
||||
os: [ubuntu-20.04]
|
||||
compiler: [clang]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.compiler }}
|
||||
env:
|
||||
COMPILER: ${{ matrix.compiler }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-db
|
||||
with:
|
||||
path: var/ccache
|
||||
key: ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}-
|
||||
${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-
|
||||
${{ env.cache-name }}-${{ matrix.os }}-
|
||||
- name: Configure OS
|
||||
run: source ./acore.sh install-deps
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
- name: Create conf/config.sh
|
||||
run: source ./apps/ci/ci-conf-db.sh
|
||||
- name: Build
|
||||
run: source ./apps/ci/ci-compile.sh
|
||||
- name: Process pending sql
|
||||
run: bash bin/acore-db-pendings
|
||||
- name: Dry run
|
||||
run: source ./apps/ci/ci-dry-run.sh dbimport
|
||||
5
.github/workflows/codestyle.yml
vendored
5
.github/workflows/codestyle.yml
vendored
@@ -1,16 +1,15 @@
|
||||
name: check-codestyle
|
||||
name: Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-codestyle:
|
||||
triage:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||
name: check codestyle
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check core codestyle
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: core
|
||||
name: nopch-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -19,26 +19,13 @@ jobs:
|
||||
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
|
||||
@@ -1,9 +1,10 @@
|
||||
name: main
|
||||
name: pch-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types: ['labeled', 'opened', 'synchronize', 'reopened']
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||
@@ -15,8 +16,9 @@ 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]
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
compiler: clang12
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}-${{ matrix.compiler }}
|
||||
env:
|
||||
@@ -37,7 +39,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
|
||||
8
.github/workflows/core_modules_build.yml
vendored
8
.github/workflows/core_modules_build.yml
vendored
@@ -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')
|
||||
)
|
||||
@@ -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
|
||||
|
||||
7
.github/workflows/cpp-check.yml
vendored
7
.github/workflows/cpp-check.yml
vendored
@@ -1,12 +1,5 @@
|
||||
name: cpp-check
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths:
|
||||
- src/**
|
||||
- "!README.md"
|
||||
- "!docs/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- src/**
|
||||
|
||||
3
.github/workflows/macos_build.yml
vendored
3
.github/workflows/macos_build.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-11
|
||||
- macos-12
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}
|
||||
@@ -40,5 +39,3 @@ jobs:
|
||||
run: source ./acore.sh install-deps
|
||||
- name: Build
|
||||
run: source ./apps/ci/mac/ci-compile.sh
|
||||
- name: Run unit tests
|
||||
run: source ./apps/ci/ci-run-unit-tests.sh
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
name: Check pending SQL
|
||||
name: SQL Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-pending-sql:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||
steps:
|
||||
7
.github/workflows/tools_build.yml
vendored
7
.github/workflows/tools_build.yml
vendored
@@ -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
|
||||
|
||||
21
.github/workflows/windows_build.yml
vendored
21
.github/workflows/windows_build.yml
vendored
@@ -34,29 +34,8 @@ jobs:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
run: |
|
||||
./acore.sh install-deps
|
||||
- name: Process pending sql
|
||||
shell: bash
|
||||
run: bash bin/acore-db-pendings
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
export CTOOLS_BUILD=all
|
||||
./acore.sh compiler build
|
||||
- name: Copy dll files
|
||||
shell: bash
|
||||
run: |
|
||||
cp "/c/Program Files/OpenSSL/bin/legacy.dll" "env/dist"
|
||||
- name: Dry run authserver
|
||||
shell: bash
|
||||
run: |
|
||||
source ./apps/ci/ci-gen-server-conf-files.sh "authserver" "configs" "."
|
||||
cd env/dist
|
||||
./authserver -dry-run
|
||||
- name: Dry run worldserver
|
||||
shell: bash
|
||||
run: |
|
||||
source ./apps/ci/ci-gen-server-conf-files.sh "worldserver" "configs" "."
|
||||
cd env/dist
|
||||
./worldserver -dry-run
|
||||
- name: Stop MySQL
|
||||
run: net stop mysql
|
||||
|
||||
69
apps/ci/ci-conf-core-pch.sh
Normal file
69
apps/ci/ci-conf-core-pch.sh
Normal file
@@ -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
|
||||
@@ -26,4 +26,4 @@ if ! command -v cmake &>/dev/null ; then
|
||||
fi
|
||||
##########################################
|
||||
|
||||
brew install openssl@3 readline boost@1.76 bash-completion curl unzip mysql@8.1 ccache
|
||||
brew install openssl@3 readline boost bash-completion curl unzip mysql@8.1 ccache
|
||||
|
||||
Reference in New Issue
Block a user