-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (120 loc) · 3.36 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
name: CI
on:
pull_request:
branches:
- master
paths-ignore:
- "*.md"
- "*.txt"
- "doxyfile"
workflow_dispatch:
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
jobs:
ubuntu-latest:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
sanitizer: [none, address]
type: [RelWithDebInfo, Release]
compiler: [g++, clang++]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: |
export cxx="/usr/bin/${{ matrix.compiler }}"
if [ "${{ matrix.sanitizer }}" = "none" ]; then
./build.sh -t "${{ matrix.type }}"
else
./build.sh -t "${{ matrix.type }}" -o "-DCMAKE_CXX_FLAGS=-fsanitize=${{ matrix.sanitizer }}"
fi
- name: Run tests
run: |
git lfs install
git lfs pull
./test/testrunner.sh
macos-latest:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
sanitizer: [none, address]
type: [RelWithDebInfo, Release]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Collect dependencies
run: brew install llvm
- name: Build
run: |
if [ "${{ matrix.sanitizer }}" = "none" ]; then
./build.sh -t "${{ matrix.type }}"
else
./build.sh -t "${{ matrix.type }}" -o "-DCMAKE_CXX_FLAGS=-fsanitize=${{ matrix.sanitizer }}"
fi
- name: Run tests
run: |
git lfs install
git lfs pull
./test/testrunner.sh
windows-latest:
runs-on: windows-latest
needs: [ubuntu-latest, macos-latest]
strategy:
fail-fast: true
matrix:
type: [RelWithDebInfo, Release]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: bash build.sh -t "${{ matrix.type }}"
- name: Run tests
run: |
git lfs install
git lfs pull
bash test/testrunner.sh "${{ matrix.type }}/"
shell: bash
generate-docs:
runs-on: ubuntu-latest
needs: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
run: sudo apt install findutils doxygen graphviz
- name: Update doc branch with current master
run: |
git config --local user.name $USER_NAME
git config --local user.email "[email protected]"
git branch -D doc &>/dev/null || true
git checkout -b doc
env:
USER_NAME: matekelemen
- name: Generate Docs
run: |
cd docs
python3 prepareDocs.py
doxygen doxyfile
cd ..
- name: Generate root index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; docs/html/index.html\">" > index.html
- name: Update Remote
run: |
git add index.html docs/html -f
git commit -m "update docs"
git push -f https://$USER_NAME:[email protected]/matekelemen/mcgs.git doc
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
USER_NAME: matekelemen