forked from YaLTeR/OpenAG
-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (122 loc) · 3.35 KB
/
CI.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: CI
on:
push:
paths-ignore:
- '.travis.yml'
- 'filecopy.bat'
- 'LICENSE*'
- 'README.md'
pull_request:
paths-ignore:
- '.travis.yml'
- 'filecopy.bat'
- 'LICENSE*'
- 'README.md'
schedule:
- cron: '0 0 1 * *' # Monthly
jobs:
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
toolset: [v141_xp, v141, v142]
configuration: [Release, Debug]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: CMake generate
run: |
mkdir build
cd build
cmake -T ${{ matrix.toolset }} -A Win32 ..
- name: Build
working-directory: build
run: cmake --build . -j $env:NUMBER_OF_PROCESSORS --config ${{ matrix.configuration }}
- uses: actions/upload-artifact@v1
if: matrix.toolset == 'v141_xp'
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build\${{ matrix.configuration }}\client.dll
build-linux-gcc:
runs-on: ubuntu-latest
env:
CC: gcc-${{ matrix.gcc-ver }}
CXX: g++-${{ matrix.gcc-ver }}
strategy:
fail-fast: false
matrix:
gcc-ver: [6, 7, 8]
configuration: [Release, Debug]
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 -y install g++-${{ matrix.gcc-ver }} g++-${{ matrix.gcc-ver }}-multilib linux-libc-dev-i386-cross mesa-common-dev ninja-build rapidjson-dev
mkdir build
- name: CMake generate
working-directory: build
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
- name: Build
working-directory: build
run: ninja
- uses: actions/upload-artifact@v1
if: matrix.gcc-ver == '8'
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build/client.so
build-linux-clang:
runs-on: ubuntu-latest
env:
compiler: clang
CC: clang
CXX: clang++
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
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 -y install g++-8 g++-8-multilib linux-libc-dev-i386-cross mesa-common-dev ninja-build rapidjson-dev
mkdir build
- name: CMake generate
working-directory: build
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
- name: Build
working-directory: build
run: ninja
# GitHub Actions doesn't have a needed macOS/Xcode version
#build-macos:
# runs-on: macos
# strategy:
# fail-fast: false
# matrix:
# configuration: [Release, Debug]
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Prepare for build
# env:
# HOMEBREW_NO_ANALYTICS: 1
# run: |
# brew analytics off
# brew update
# brew install ninja
# mkdir build
# cd build
# cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
# - name: Build
# working-directory: build
# run: ninja