-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (102 loc) · 2.88 KB
/
test.yaml
File metadata and controls
114 lines (102 loc) · 2.88 KB
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
name: test
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install iverilog
shell: bash
run: sudo apt-get update && sudo apt-get install -y iverilog
# Set Python up and install cocotb
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python packages
shell: bash
run: pip install -r test/requirements.txt
- name: Run tests
run: |
cd test
make clean
make
# make will return success even if the test fails, so check for failure in the results.xml
! grep failure results.xml
- name: Test Summary
uses: test-summary/action@v2.3
with:
paths: "test/results.xml"
if: always()
- name: Install ffmpeg and ImageMagick
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ffmpeg imagemagick
version: tt07 # I think naming a version builds a reusable packages cache for that name.
- name: Convert output frames from PPMs to MP4
shell: bash
run: |
pwd
ls -al
cd test
./animate.sh ./frames_out/frames.mp4
- name: Convert output frames from PPMs to PNGs
shell: bash
run: |
pwd
ls -al
cd test
mkdir frames_out/png
cd frames_out
../animate.sh png && cd png && tar czf ../frames.tgz *.png
- name: Store PNGs and MP4
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: frames-rtl
path: |
test/frames_out/frames.mp4
test/frames_out/frames.tgz
- name: upload vcd
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-vcd
path: |
test/tb.vcd
test/result.xml
# prep_frames:
# needs: test
# runs-on: ubuntu-22.04
# steps:
# - name: Convert PPMs to MP4
# shell: bash
# run: |
# pwd
# ls -al
# cd test
# ./animate.sh ./frames_out/frames.mp4
# - name: Convert PPMs to PNGs
# shell: bash
# run: >
# cd test
# mkdir frames_out/png
# /animate.sh ./frames_out/png
# && cd ./frames_out/png
# && tar xzf ../frames.tgz *.png
# store_frames:
# needs: prep_frames
# runs-on: ubuntu-22.04
# permissions:
# pages: write
# id-token: write
# steps:
# - uses: actions/upload-artifacts@4
# with:
# name: frames-rtl
# path: |
# test/frames_out/frames.mp4
# test/frames_out/frames.tgz