forked from The-Legion-Preservation-Project/LegionCore-7.3.5
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.19 KB
/
build-clang.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Clang
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev clang-14
- name: Setup
env:
CMAKE_BUILD_TYPE: Debug
run: >
cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
-DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0
-DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG"
-DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
- name: Build
run: |
cd bin
make -j 4 -k && make install
- name: Check executables
run: |
cd ${{ github.workspace }}/check_install/bin
./bnetserver --version
./worldserver --version