feat(CI): skip matrix builds for non-C++ changes (#9008)
This commit is contained in:
parent
cb07d1fc8a
commit
7cd03f1429
5 changed files with 69 additions and 17 deletions
4
.github/labeler.yml
vendored
4
.github/labeler.yml
vendored
|
|
@ -1,3 +1,7 @@
|
||||||
|
file-cpp:
|
||||||
|
- ./*.cpp
|
||||||
|
- ./*.h
|
||||||
|
|
||||||
DB:
|
DB:
|
||||||
- data/**/*.sql
|
- data/**/*.sql
|
||||||
|
|
||||||
|
|
|
||||||
16
.github/workflows/core_build.yml
vendored
16
.github/workflows/core_build.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: core-build
|
name: main
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
@ -17,20 +17,6 @@ jobs:
|
||||||
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
|
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
|
||||||
os: [ubuntu-20.04]
|
os: [ubuntu-20.04]
|
||||||
compiler: [clang]
|
compiler: [clang]
|
||||||
# we can include specific combinations here
|
|
||||||
include:
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
compiler: clang12
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
compiler: clang11
|
|
||||||
- os: ubuntu-18.04
|
|
||||||
compiler: clang10
|
|
||||||
- os: ubuntu-18.04
|
|
||||||
compiler: gcc8
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
compiler: gcc # default in 20.04 is gcc 9
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
compiler: gcc10
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: ${{ matrix.os }}-${{ matrix.compiler }}
|
name: ${{ matrix.os }}-${{ matrix.compiler }}
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
62
.github/workflows/core_matrix_build.yml
vendored
Normal file
62
.github/workflows/core_matrix_build.yml
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
name: core
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
pull_request:
|
||||||
|
types: ['labeled']
|
||||||
|
|
||||||
|
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 builds
|
||||||
|
include:
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
compiler: clang12
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
compiler: clang11
|
||||||
|
- os: ubuntu-18.04
|
||||||
|
compiler: clang10
|
||||||
|
- os: ubuntu-18.04
|
||||||
|
compiler: gcc8
|
||||||
|
- 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.label.name == 'run-build' || github.event.label.name == 'file-cpp' || github.ref == 'refs/heads/master')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
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.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
|
||||||
2
.github/workflows/core_modules_build.yml
vendored
2
.github/workflows/core_modules_build.yml
vendored
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
|
||||||
env:
|
env:
|
||||||
COMPILER: ${{ matrix.compiler }}
|
COMPILER: ${{ matrix.compiler }}
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && (github.event.label.name == 'file-cpp' || github.event.label.name == 'run-build' || github.ref == 'refs/heads/master')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Checkout modules
|
- name: Checkout modules
|
||||||
|
|
|
||||||
2
.github/workflows/cpp20.yml
vendored
2
.github/workflows/cpp20.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
COMPILER: clang
|
COMPILER: clang
|
||||||
ENABLE_CPP_20: 1
|
ENABLE_CPP_20: 1
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && (github.event.label.name == 'file-cpp' || github.event.label.name == 'run-build' || github.ref == 'refs/heads/master')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Cache
|
- name: Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue