feat(CI): rework core ubuntu build, ubuntu-22 support (#17281)

feat(CI): rework core ubuntu build
This commit is contained in:
Mike Delago
2024-03-27 14:58:27 -04:00
committed by GitHub
parent 02cf369fe2
commit 3ff8de2086
4 changed files with 226 additions and 87 deletions

View File

@@ -4,7 +4,10 @@ on:
branches:
- 'master'
pull_request:
types: ['opened', 'synchronize', 'reopened']
types:
- opened
- reopened
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
@@ -15,42 +18,30 @@ jobs:
strategy:
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
compiler:
CC: gcc-10
CXX: g++-10
- os: ubuntu-20.04
compiler: gcc10
compiler:
CC: clang-12
CXX: clang++-12
- os: ubuntu-22.04
compiler:
CC: clang-15
CXX: clang++-15
- os: ubuntu-22.04
compiler:
CC: gcc-13
CXX: g++-13
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}-nopch
env:
COMPILER: ${{ matrix.compiler }}
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
- uses: ./.github/actions/linux-build
with:
path: var/ccache
key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.compiler }}
- name: Configure OS
run: source ./acore.sh install-deps
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf-core.sh
- name: Process pending sql
run: bash bin/acore-db-pendings
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run authserver
run: source ./apps/ci/ci-dry-run.sh authserver
- name: Dry run worldserver
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
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
pch: false

View File

@@ -15,32 +15,30 @@ jobs:
strategy:
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
compiler:
CC: gcc-10
CXX: g++-10
- os: ubuntu-20.04
compiler:
CC: clang-12
CXX: clang++-12
- os: ubuntu-22.04
compiler:
CC: clang-15
CXX: clang++-15
- os: ubuntu-22.04
compiler:
CC: gcc-13
CXX: g++-13
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}-pch
env:
COMPILER: ${{ matrix.compiler }}
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
- name: Configure OS
run: source ./acore.sh install-deps
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf-core-pch.sh
- name: Process pending sql
run: bash bin/acore-db-pendings
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run authserver
run: source ./apps/ci/ci-dry-run.sh authserver
- name: Dry run worldserver
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
- uses: ./.github/actions/linux-build
with:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
pch: true

View File

@@ -12,22 +12,13 @@ concurrency:
jobs:
build-modules:
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]
modules: [with]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
env:
COMPILER: ${{ matrix.compiler }}
runs-on: ubuntu-latest
name: modules build on latest ubuntu
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (
github.ref == 'refs/heads/master'
github.ref_name == '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')
@@ -35,24 +26,9 @@ jobs:
)
steps:
- uses: actions/checkout@v4
- name: Checkout modules
run: ./apps/ci/ci-install-modules.sh
if: matrix.modules == 'with'
- name: Cache
uses: actions/cache@v3
- uses: ./.github/actions/linux-build
with:
path: var/ccache
key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules
- name: Configure OS
run: source ./acore.sh install-deps
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf-core.sh
- name: Process pending sql
run: bash bin/acore-db-pendings
- name: Build
run: source ./apps/ci/ci-compile.sh
CC: clang-15
CXX: clang++-15
modules: true
pch: false