mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
82 lines
2.0 KiB
YAML
82 lines
2.0 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
with:
|
|
key: ${{ runner.os }}-ccache
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential ninja-build ccache
|
|
|
|
- name: Configure
|
|
run: |
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
-DEQEMU_BUILD_TESTS=ON \
|
|
-DEQEMU_BUILD_LOGIN=ON \
|
|
-DEQEMU_BUILD_LUA=ON \
|
|
-DEQEMU_BUILD_PERL=ON \
|
|
-DEQEMU_BUILD_CLIENT_FILES=ON
|
|
|
|
- name: Build
|
|
run: cmake --build build --parallel
|
|
|
|
- name: Test
|
|
working-directory: build
|
|
run: ./bin/tests
|
|
|
|
windows:
|
|
name: Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Enable long paths
|
|
run: git config --global core.longpaths true
|
|
|
|
- name: Setup MSVC environment
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: x64
|
|
|
|
- name: Configure
|
|
shell: pwsh
|
|
run: |
|
|
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
|
-DEQEMU_BUILD_TESTS=ON `
|
|
-DEQEMU_BUILD_LOGIN=ON `
|
|
-DEQEMU_BUILD_LUA=ON `
|
|
-DEQEMU_BUILD_ZLIB=ON `
|
|
-DEQEMU_BUILD_CLIENT_FILES=ON
|
|
|
|
- name: Build
|
|
shell: pwsh
|
|
run: cmake --build build --parallel --config RelWithDebInfo --target ALL_BUILD -- /m
|
|
|
|
- name: Test
|
|
working-directory: build
|
|
run: ./bin/RelWithDebInfo/tests.exe
|