forked from YaLTeR/OpenAG
-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (85 loc) · 2.81 KB
/
build.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Compile Windows & Liability OS.
on: [push]
env:
BUILD_CONFIGURATION: Release
jobs:
build-windows:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
toolset: [v142]
configuration: [Release]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: CMake generate
run: cmake -T ${{ matrix.toolset }} -A Win32 -B build
- name: Build
run: cmake --build build -j $env:NUMBER_OF_PROCESSORS --config ${{ matrix.configuration }}
build-linux-gcc:
name: build-linux (gcc-${{ matrix.gcc-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gcc-ver: [11]
configuration: [Release]
env:
CC: gcc-${{ matrix.gcc-ver }}
CXX: g++-${{ matrix.gcc-ver }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.gcc-ver }}-multilib libgl-dev ninja-build rapidjson-dev
- name: CMake generate
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -B build
- name: Build
working-directory: build
run: ninja
build-linux-clang:
name: build-linux (clang-${{ matrix.clang-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
clang-ver: [12] # #.0 is interpreted as integer without quotation marks
configuration: [Release]
env:
CC: clang-${{ matrix.clang-ver }}
CXX: clang++-${{ matrix.clang-ver }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup
run: |
if [ '${{ matrix.clang-ver }}' -ge '11' ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
fi
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang-ver }} g++-multilib libgl-dev ninja-build rapidjson-dev
- name: CMake generate
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -B build
ls -1
- name: Build
working-directory: build
run: ninja
- name: Publish Linux client binary.
uses: actions/upload-artifact@v4
with:
path: |
build/client.so
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}