mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
122 lines
4.0 KiB
YAML
122 lines
4.0 KiB
YAML
name: core-build
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**' # matches every branch
|
|
- '!coverity_scan' # excludes coverity_scan
|
|
pull_request:
|
|
|
|
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]
|
|
modules: [with, without]
|
|
extra_logs: [false]
|
|
# we can include specific combinations here
|
|
include:
|
|
- os: ubuntu-20.04
|
|
compiler: clang11
|
|
modules: without
|
|
extra_logs: true
|
|
- os: ubuntu-20.04
|
|
compiler: clang11
|
|
modules: without
|
|
extra_logs: false
|
|
- os: ubuntu-20.04
|
|
compiler: clang9
|
|
modules: without
|
|
extra_logs: false
|
|
- os: ubuntu-18.04
|
|
compiler: clang # default in 18.04 is clang 6
|
|
modules: without
|
|
extra_logs: false
|
|
- os: ubuntu-18.04
|
|
compiler: gcc8
|
|
modules: without
|
|
extra_logs: false
|
|
- os: ubuntu-20.04
|
|
compiler: gcc # default in 20.04 is gcc 9
|
|
modules: without
|
|
extra_logs: false
|
|
- os: ubuntu-20.04
|
|
compiler: gcc10
|
|
modules: without
|
|
extra_logs: false
|
|
runs-on: ${{ matrix.os }}
|
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules-extra_logs-${{ matrix.extra_logs }}
|
|
env:
|
|
COMPILER: ${{ matrix.compiler }}
|
|
EXTRA_LOGS: ${{ matrix.extra_logs }}
|
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout modules
|
|
run: ./apps/ci/ci-install-modules.sh
|
|
if: matrix.modules == 'with'
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /home/runner/.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.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
|
|
|
|
docker-build-n-deploy:
|
|
strategy:
|
|
fail-fast: true
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
|
env:
|
|
DOCKER_EXTENDS_BIND: abstract-no-bind
|
|
DOCKER_BUILD_WORLD_TARGET: worldserver
|
|
DOCKER_BUILD_AUTH_TARGET: authserver
|
|
steps:
|
|
- name: Extract branch name
|
|
shell: bash
|
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
id: extract_branch
|
|
- uses: actions/checkout@v2
|
|
- name: Configure
|
|
run: |
|
|
docker --version
|
|
docker-compose --version
|
|
- name: Build
|
|
#env:
|
|
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
|
run: |
|
|
docker-compose --profile all build
|
|
- name: Login to Docker Hub
|
|
if: ${{ steps.extract_branch.outputs.branch == 'master' }}
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Deploy
|
|
#env:
|
|
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
|
if: ${{ steps.extract_branch.outputs.branch == 'master' }}
|
|
run: |
|
|
docker-compose --profile all push
|
|
|