-
Notifications
You must be signed in to change notification settings - Fork 22
96 lines (83 loc) · 2.62 KB
/
bsg-test-diff.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
name: BSG test diff check
on:
workflow_call:
env:
GHA_CUSTOM_LINE_PREFIX: "▌"
jobs:
diff-bsg-tests:
runs-on: [self-hosted, Linux, X64, gcp-custom-runners]
container: ubuntu:jammy
name: Parse and diff BSG Micro Designs
env:
DEBIAN_FRONTEND: noninteractive
GHA_MACHINE_TYPE: "n2-standard-2"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up common Ubuntu configuration
run: |
./.github/scripts/set-up-common-ubuntu-configuration.sh
./.github/scripts/set-up-common-git-configuration.sh
- name: Install dependencies
run: |
apt-get update -q
apt-get install -y \
ant \
build-essential \
cmake \
default-jre \
flex \
gettext-base \
git \
google-perftools \
jq \
libfl-dev \
libgoogle-perftools-dev \
python3 \
python3-dev \
swig \
tcl-dev \
tclsh \
time \
uuid \
uuid-dev \
;
- name: Checkout submodules
run: |
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/bsg_micro_designs \
;
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: binaries-plugin
# See https://github.com/actions/upload-artifact/issues/38
- name: Extract
run: tar -xf binaries-plugin.tar
- name: Generate and diff tests
run: |
export PATH="$PWD/out/bin:$PATH"
python3 ./tests/bsg_micro_designs/generate_bsg_tests.py
- name: Summary
if: ${{ !cancelled() }}
run: |
cat tests/bsg_micro_designs/build/bsg_micro_designs_summary.md > $GITHUB_STEP_SUMMARY
- name: Upload BSG Micro Design tests' output
uses: actions/upload-artifact@v4
with:
name: bsg-outputs
path: |
tests/bsg_micro_designs/build/*/dut.v
tests/bsg_micro_designs/build/*/dut.v.diff
tests/bsg_micro_designs/build/*/parameters.txt
- name: Upload BSG Micro Design tests' logs
uses: actions/upload-artifact@v4
with:
name: bsg-logs
path: |
tests/bsg_micro_designs/build/*
!tests/bsg_micro_designs/build/*/dut.v
!tests/bsg_micro_designs/build/*/dut.v.diff
!tests/bsg_micro_designs/build/*/parameters.txt