-
Notifications
You must be signed in to change notification settings - Fork 6
317 lines (267 loc) · 8.74 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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
name: yosys-verific CI
on:
workflow_dispatch:
pull_request:
jobs:
linux-gcc:
name: ${{ matrix.mode }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
mode:
- test
- install
env:
MODE: ${{ matrix.mode }}
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_RTL_BENCHMARK }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS_RS_PLUGIN }}
${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTHESIS }}
${{ secrets.SSH_PRIVATE_KEY_ABC }}
${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }}
${{ secrets.SSH_PRIVATE_KEY_VERIFIC }}
${{ secrets.SSH_RS_FPGA_PRIMITIVES }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
working-directory: ./.github/scripts
run: |
bash install_ubuntu_dependencies_build.sh
- name: Use ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: linux-${{ matrix.mode }}
- name: Configure shell
run: |
echo 'CC=gcc-9' >> $GITHUB_ENV
echo 'CXX=g++-9' >> $GITHUB_ENV
echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV
echo 'PREFIX=/tmp/yosys_verific-install' >> $GITHUB_ENV
echo "ADDITIONAL_CMAKE_OPTIONS='-DMY_CXX_WARNING_FLAGS="-W -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Werror -UNDEBUG"'" >> $GITHUB_ENV
echo 'RULE_MESSAGES=off' >> $GITHUB_ENV
- name: Show shell configuration
run: |
env
which cmake && cmake --version
which make && make --version
which python && python --version
which ninja && ninja --version
which $CC && $CC --version
which $CXX && $CXX --version
- name: Test
if: matrix.mode == 'test'
run: |
make release
make test_gen
make clean_test
make test
make clean
make debug
make dtest
- name: Install Test
if: matrix.mode == 'install'
run: |
make release
make install
make clean # make sure we only see installation artifacts
make test_install
centos7-gcc:
name: centos7-gcc
runs-on: ubuntu-latest
container:
image: centos:7
defaults:
run:
shell: bash
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install ssh-agent
run: |
yum install -y openssh-server openssh-clients
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install -y https://repo.ius.io/ius-release-el7.rpm
yum install -y centos-release-scl
yum install -y devtoolset-9
yum install -y devtoolset-9-toolchain
yum remove -y git
yum remove -y git-*
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y git
- name: ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_RTL_BENCHMARK }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS_RS_PLUGIN }}
${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTHESIS }}
${{ secrets.SSH_PRIVATE_KEY_ABC }}
${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }}
${{ secrets.SSH_PRIVATE_KEY_VERIFIC }}
${{ secrets.SSH_RS_FPGA_PRIMITIVES }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
working-directory: ./.github/scripts
run: |
bash install_centos_dependencies_build.sh
- name: Configure shell
run: |
echo 'CC=/opt/rh/devtoolset-9/root/usr/bin/gcc' >> $GITHUB_ENV
echo 'CXX=/opt/rh/devtoolset-9/root/usr/bin/g++' >> $GITHUB_ENV
echo "/opt/rh/devtoolset-9/root/usr/bin" >> $GITHUB_PATH
echo 'PREFIX=/tmp/yosys_verific-install' >> $GITHUB_ENV
echo "ADDITIONAL_CMAKE_OPTIONS='-DMY_CXX_WARNING_FLAGS="-W -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Werror -UNDEBUG"'" >> $GITHUB_ENV
echo 'RULE_MESSAGES=off' >> $GITHUB_ENV
- name: Show shell configuration
run: |
env
which gcc
which g++
- name: Configure git
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Build
run: |
make release
make install
- name: Unit tests
run: |
make clean
make test_install
macos-gcc:
if: ${{ false }} # EDA-799
name: macos-gcc
runs-on: macos-latest
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_RTL_BENCHMARK }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS_RS_PLUGIN }}
${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTHESIS }}
${{ secrets.SSH_PRIVATE_KEY_ABC }}
${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }}
${{ secrets.SSH_PRIVATE_KEY_VERIFIC }}
${{ secrets.SSH_RS_FPGA_PRIMITIVES }}
- name: Checkout code
uses: actions/checkout@v2
- name: Use ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macos-gcc
- name: Install dependencies
working-directory: ./.github/scripts
run: |
bash install_macos_dependencies_build.sh
- name: Configure shell
run: |
echo 'CC=gcc-9' >> $GITHUB_ENV
echo 'CXX=g++-9' >> $GITHUB_ENV
echo "/usr/local/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=\"/usr/local/opt/openssl@3/lib/pkgconfig\"" >> $GITHUB_ENV
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
echo 'PREFIX=${GITHUB_WORKSPACE}/install' >> $GITHUB_ENV
- name: Show shell configuration
run: |
env
which cmake && cmake --version
which make && make --version
which python && python --version
which $CC && $CC --version
which $CXX && $CXX --version
which bison && bison --version
which install && install --version
- name: Build
run: |
make release
make install
- name: Unit tests
run: |
make clean
make test_install
macos-clang:
if: ${{ false }} # EDA-799
name: macos-clang
runs-on: macos-latest
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_RTL_BENCHMARK }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS }}
${{ secrets.SSH_PRIVATE_KEY_YOSYS_RS_PLUGIN }}
${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTHESIS }}
${{ secrets.SSH_PRIVATE_KEY_ABC }}
${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }}
${{ secrets.SSH_PRIVATE_KEY_VERIFIC }}
${{ secrets.SSH_RS_FPGA_PRIMITIVES }}
- name: Checkout code
uses: actions/checkout@v2
- name: Use ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macos-clang
- name: Install dependencies
working-directory: ./.github/scripts
run: |
bash install_macos_dependencies_build.sh
- name: Configure shell
run: |
echo 'PREFIX=${GITHUB_WORKSPACE}/install' >> $GITHUB_ENV
echo "/usr/local/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=\"/usr/local/opt/openssl@3/lib/pkgconfig\"" >> $GITHUB_ENV
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
- name: Show shell configuration
run: |
env
which cmake && cmake --version
which make && make --version
which python && python --version
which -a bison && bison --version
- name: Build
run: |
make release
make install
- name: Unit tests
run: |
make clean
make test_install