mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 03:23:48 +00:00
feat(CI): migrate from Travis to GitHub Actions (#2887)
Co-authored-by: Yehonal <yehonal.azeroth@gmail.com>
This commit is contained in:
59
.github/workflows/core_build.yml
vendored
Normal file
59
.github/workflows/core_build.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: core-build
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler: [clang6, clang7]
|
||||
modules: [with, without]
|
||||
runs-on: ubuntu-18.04
|
||||
name: ${{ matrix.compiler }}-${{ matrix.modules }}-modules
|
||||
env:
|
||||
COMPILER: ${{ matrix.compiler }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout modules
|
||||
run: ./apps/ci/ci-install-modules.sh
|
||||
if: matrix.modules == 'with'
|
||||
- name: Cache
|
||||
uses: actions/cache@v1.1.2
|
||||
with:
|
||||
path: /home/runner/.ccache
|
||||
key: ccache:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
|
||||
ccache:${{ matrix.compiler }}:${{ matrix.modules }}-modules
|
||||
ccache:${{ matrix.compiler }}
|
||||
ccache
|
||||
- name: Configure OS
|
||||
run: source ./apps/ci/ci-install.sh
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
- 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
|
||||
|
||||
docker-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
run: |
|
||||
docker --version
|
||||
docker-compose --version
|
||||
./apps/ci/docker/ci-docker-config.sh
|
||||
./bin/acore-docker-generate-etc
|
||||
- name: Build
|
||||
run: |
|
||||
./bin/acore-docker-build-no-scripts
|
||||
32
.github/workflows/import_pending_sql.yml
vendored
Normal file
32
.github/workflows/import_pending_sql.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: import-pending-sql
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
import-pending-sql:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Extract branch name
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
- name: Import and commit pending sql
|
||||
run: |
|
||||
git config user.email "azerothcorebot@gmail.com" && git config user.name "AzerothCoreBot"
|
||||
cd bin/
|
||||
source acore-db-pendings
|
||||
cd ..
|
||||
git fetch --unshallow origin ${BRANCH}
|
||||
git add -A .
|
||||
git commit -am "Import pending SQL update file..." -m "Referenced commit(s):${GITHUB_SHA}" || true
|
||||
env:
|
||||
BRANCH: ${{ steps.extract_branch.outputs.branch }}
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||
Reference in New Issue
Block a user