-
Notifications
You must be signed in to change notification settings - Fork 0
188 lines (165 loc) · 4.86 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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
debug:
name: debug-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}}
runs-on: ${{matrix.config.image}}
strategy:
fail-fast: false
matrix:
config:
- {
image: ubuntu-20.04,
arch: x86_64,
os: ubuntu,
compiler: clang10,
cc: clang-10,
cxx: clang++-10
}
- {
image: windows-2019,
arch: x86_64,
os: windows,
compiler: vs2019,
generator: vs2019
}
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install-unix
if: matrix.config.os != 'windows'
run: |
echo "Installing llvm-10"; sudo apt install llvm-10
sudo ln -s /usr/bin/llvm-cov-10 /usr/bin/llvm-cov
sudo ln -s /usr/bin/llvm-profdata-10 /usr/bin/llvm-profdata
- name: configure-unix
if: matrix.config.os != 'windows'
run: ./scripts/configure.sh --type Debug --sanitize --coverage --tests --fuzz --lint
- name: configure-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Debug -Tests
- name: build-unix
if: matrix.config.os != 'windows'
run: ./scripts/build.sh
- name: build-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\build.ps1
- name: test-unix
if: matrix.config.os != 'windows'
run: ./scripts/test.sh
- name: test-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\test.ps1
- name: fuzz-corpus-cache
if: matrix.config.os != 'windows'
uses: actions/cache@v2
with:
path: ./fuzz/corpus
key: fuzz-corpus
- name: fuzz-lex
if: matrix.config.os != 'windows'
run: ./scripts/fuzz.sh --path bin/novfuzz-lex --duration 60
- name: fuzz-parse
if: matrix.config.os != 'windows'
run: ./scripts/fuzz.sh --path bin/novfuzz-parse --duration 60
- name: upload-coverage
if: matrix.config.os != 'windows'
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: ./scripts/upload_coverage.sh --token "${CODECOV_TOKEN}"
release:
name: release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}}
runs-on: ${{matrix.config.image}}
strategy:
fail-fast: false
matrix:
config:
- {
image: ubuntu-18.04,
arch: x86_64,
os: ubuntu,
compiler: gcc9,
cc: gcc-9,
cxx: g++-9
}
- {
image: ubuntu-18.04,
arch: x86_64,
os: ubuntu,
compiler: clang9,
cc: clang-9,
cxx: clang++-9
}
- {
image: macos-10.15,
arch: x86_64,
os: macos,
compiler: appleclang,
cc: clang,
cxx: clang++
}
- {
image: windows-2019,
arch: x86_64,
os: windows,
compiler: mingw-w64-7,
generator: MinGW
}
- {
image: windows-2019,
arch: x86_64,
os: windows,
compiler: vs2019,
generator: vs2019
}
- {
image: windows-2019,
arch: x86_64,
os: windows,
compiler: vs2019-clang,
generator: vs2019-clang
}
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
steps:
- uses: actions/checkout@v2
- name: install-windows-mingw
if: matrix.config.os == 'windows' && matrix.config.generator == 'MinGW'
run: |
echo "Installing mingw-w64-7"
choco install mingw --version=7.3.0 --force
echo "g++.exe --version:"; g++.exe --version
- name: configure-unix
if: matrix.config.os != 'windows'
run: ./scripts/configure.sh --type Release --tests
- name: configure-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\configure.ps1 -Gen ${{matrix.config.generator}} -Type Release -Tests
- name: build-unix
if: matrix.config.os != 'windows'
run: ./scripts/build.sh
- name: build-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\build.ps1
- name: test-unix
if: matrix.config.os != 'windows'
run: ./scripts/test.sh
- name: test-windows
if: matrix.config.os == 'windows'
run: pwsh .\scripts\test.ps1
- name: archive
uses: actions/upload-artifact@v2
with:
name: novus-release-${{matrix.config.image}}-${{matrix.config.arch}}-${{matrix.config.compiler}}
path: bin