-
Notifications
You must be signed in to change notification settings - Fork 2
154 lines (129 loc) · 3.82 KB
/
Test.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
name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 15 * * *'
env:
CI: true
jobs:
lin-setup-verification:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 8
matrix:
backend: [
mcode,
llvm,
gcc
]
project: [
OSVVM,
UVVM
]
name: '🐧 ${{ matrix.project }} · bash · ${{ matrix.backend }}'
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
- name: '⚙️ Setup GHDL'
uses: ghdl/setup-ghdl-ci@master
with:
backend: ${{ matrix.backend }}
- run: ./verification/${{ matrix.project }}/run.sh
win-verification:
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 8
matrix:
sys: [
{icon: '🟦', installs: 'MINGW32', arch: i686, pkg: 'mcode' },
#{icon: '🟦', installs: "MINGW32", arch: i686, pkg: "llvm" }, ! Not yet functional
#{icon: '🟪', installs: "MINGW64", arch: x86_64, pkg: "mcode" }, ! mcode is not yet supported on win64
{icon: '🟪', installs: 'MINGW64', arch: x86_64, pkg: 'llvm' },
]
project: [
OSVVM,
UVVM
]
shell: [
msys2,
psh
]
name: '${{ matrix.sys.icon }} ${{ matrix.project }} · ${{ matrix.shell }} · ${{ matrix.sys.installs }} ${{ matrix.sys.pkg }}'
defaults:
run:
shell: msys2 {0}
steps:
- name: '${{ matrix.sys.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys.installs }}
update: true
install: git
- name: '🧰 Checkout'
uses: actions/checkout@v2
- name: '⚙️ Setup GHDL'
uses: ghdl/setup-ghdl-ci@master
with:
backend: ${{ matrix.sys.pkg }}
- name: '${{ matrix.sys.icon }} Compile ${{ matrix.project }}'
if: matrix.shell == 'msys2'
run: ./verification/${{ matrix.project }}/run.sh
- name: Compile ${{ matrix.project }}
if: matrix.shell == 'psh'
shell: pwsh
run: verification\${{ matrix.project }}\run.ps1
env:
CC: gcc
DOM:
runs-on: ubuntu-latest
name: '🐧 ${{ matrix.project }} · DOM'
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
with:
submodules: recursive
- name: '⚙️ Setup GHDL'
uses: ghdl/setup-ghdl-ci@master
- name: '🐍 Setup Python'
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: '🐍 Install dependencies'
run: |
pip3 install pytest pytest-reporter pytest-reporter-html1 pytest-xdist
pip3 install git+https://github.com/ghdl/ghdl.git@$(ghdl version hash)
- name: '📦 Clone repositories to be analysed'
run: |
for prj in \
ghdl/ghdl \
ghdl/ghdl-cosim \
ghdl/ghdl-yosys-plugin \
VUnit/vunit VLSI-EDA/PoC \
antonblanchard/microwatt \
stnolting/NEORV32;
do git clone https://github.com/"$prj"; done
- name: '🚧 Run pytest'
run: pytest -n $(nproc) --template=html1/index.html --report=report.html TestDOM.py
- name: '📤 Upload artifact: report.html'
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
with:
path: report.html
- name: '📓 Publish report to gh-pages'
if: github.event_name != 'pull_request'
run: |
mkdir public
cd public
git init
cp ../.git/config ./.git/config
touch .nojekyll
cp ../report.html ./index.html
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages