mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
name: ubuntu-build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
concurrency:
|
|
group: "core-build-${{ github.event.pull_request.number }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
|
|
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-22.04
|
|
c_compiler: clang
|
|
cpp_compiler: clang++
|
|
build_type: Release
|
|
- os: ubuntu-22.04
|
|
c_compiler: gcc
|
|
cpp_compiler: g++
|
|
build_type: Release
|
|
- os: ubuntu-24.04
|
|
c_compiler: gcc
|
|
cpp_compiler: g++
|
|
build_type: Release
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
name: ${{ matrix.os }}-${{ matrix.cpp_compiler }}
|
|
|
|
steps:
|
|
- name: Checkout AzerothCore
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'mod-playerbots/azerothcore-wotlk'
|
|
ref: 'Playerbot'
|
|
|
|
- name: Set reusable strings
|
|
id: strings
|
|
shell: bash
|
|
run: |
|
|
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Checkout Playerbot Module
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'mod-playerbots/mod-playerbots'
|
|
path: 'modules/mod-playerbots'
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ github.workspace }}/var/ccache
|
|
key: ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}:${{ github.sha }}
|
|
restore-keys: |
|
|
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}
|
|
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}
|
|
ccache:${{ matrix.os }}
|
|
|
|
- name: Install Requirements
|
|
run: sudo apt-get update && sudo apt-get install ccache git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev
|
|
|
|
- name: Configure CMake
|
|
run: >
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}
|
|
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
|
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
-S ${{ github.workspace }}
|
|
|
|
- name: Build
|
|
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|