-
Notifications
You must be signed in to change notification settings - Fork 39
115 lines (111 loc) · 3.5 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
name: CI
on:
push:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- '*.md'
- 'LICENSE*'
pull_request:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- '*.md'
- 'LICENSE*'
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly
jobs:
build-windows:
name: Build (Windows, ${{ matrix.config.toolset }}, ${{ matrix.configuration }})
runs-on: ${{ matrix.config.runs-on }}
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
config:
- {runs-on: windows-2019, toolset: v141_xp}
- {runs-on: windows-2022, toolset: v143}
configuration: [Release, Debug]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: CMake generate
run: cmake -T ${{ matrix.config.toolset }} -A Win32 -B build
- name: Build
run: cmake --build build -j $env:NUMBER_OF_PROCESSORS --config ${{ matrix.configuration }}
- uses: actions/upload-artifact@v3
if: matrix.config.toolset == 'v141_xp'
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build\${{ matrix.configuration }}\client.dll
if-no-files-found: error
build-linux-gcc:
name: Build (Linux, gcc-${{ matrix.gcc-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
gcc-ver: [9, 11]
configuration: [Release, Debug]
env:
CC: gcc-${{ matrix.gcc-ver }}
CXX: g++-${{ matrix.gcc-ver }}
steps:
- uses: actions/checkout@v3
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
- uses: actions/upload-artifact@v3
if: matrix.gcc-ver == '11'
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build/client.so
if-no-files-found: error
build-linux-clang:
name: Build (Linux, clang-${{ matrix.clang-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
clang-ver: ['6.0', 16]
configuration: [Release, Debug]
env:
CC: clang-${{ matrix.clang-ver }}
CXX: clang++-${{ matrix.clang-ver }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup
run: |
if [ ${{ matrix.clang-ver }} -eq 16 ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.clang-ver }} 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
- name: Build
working-directory: build
run: ninja