-
Notifications
You must be signed in to change notification settings - Fork 29
149 lines (140 loc) · 5.43 KB
/
trace.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
name: Compile Wave Trace
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
env:
USER: runner
# Cancel the current workflow when new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
gen-test-plan-for-t1emu:
if: '! github.event.pull_request.draft'
name: "[T1EMU] Generate test plan"
runs-on: [self-hosted, linux, nixos]
outputs:
testplan: ${{ steps.get-all-configs.outputs.out }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: "get-all-configs"
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --top t1emu)" > $GITHUB_OUTPUT
build-t1emu-vcs-emulators:
name: "[T1EMU] Build VCS trace emulators"
needs: [gen-test-plan-for-t1emu]
runs-on: [self-hosted, linux, nixos, BIGRAM]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-test-plan-for-t1emu.outputs.testplan) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build T1Emu vcs emulator"
run: |
nix build '.#t1.${{ matrix.config }}.t1emu.vcs-emu-trace' --impure --no-link --cores 64
nix build '.#t1.${{ matrix.config }}.t1emu.run.mlir.hello.vcs-emu-trace' --impure
if [[ ! -r ./result/mlir.hello.fsdb ]]; then
echo "FAIL: fsdb not found" >&2
exit 1
fi
gen-test-plan-for-t1rocketemu:
if: '! github.event.pull_request.draft'
name: "[T1ROCKETEMU] Generate test plan"
runs-on: [self-hosted, linux, nixos]
outputs:
testplan: ${{ steps.get-all-configs.outputs.out }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: "get-all-configs"
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --top t1rocketemu)" > $GITHUB_OUTPUT
build-t1rocketemu-vcs-emulators:
name: "[T1RocketEMU] Build VCS trace emulators"
needs: [gen-test-plan-for-t1rocketemu]
runs-on: [self-hosted, linux, nixos, BIGRAM]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-test-plan-for-t1rocketemu.outputs.testplan) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build T1RocketEmu vcs emulator"
run: |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.vcs-emu-trace' --impure --no-link --cores 64
nix build '.#t1.${{ matrix.config }}.t1rocketemu.run.mlir.hello.vcs-emu-trace' --impure
if [[ ! -r ./result/mlir.hello.fsdb ]]; then
echo "FAIL: fsdb not found" >&2
exit 1
fi
gen-test-plan-for-verilator-t1emu:
if: '! github.event.pull_request.draft'
name: "[T1EMU] Generate test plan"
runs-on: [self-hosted, linux, nixos]
outputs:
testplan: ${{ steps.get-all-configs.outputs.out }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: "get-all-configs"
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --caseDir verilator --top t1emu)" > $GITHUB_OUTPUT
build-t1emu-verilator-emulators:
name: "[T1EMU] Build verilator trace emulators"
needs: [gen-test-plan-for-verilator-t1emu]
runs-on: [self-hosted, linux, nixos, BIGRAM]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-test-plan-for-verilator-t1emu.outputs.testplan) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build T1Emu verilator emulator"
run: |
nix build '.#t1.${{ matrix.config }}.t1emu.verilator-emu-trace' --impure --no-link --cores 64
nix build '.#t1.${{ matrix.config }}.t1emu.run.mlir.hello.verilator-emu-trace' --impure
if [[ ! -r ./result/mlir.hello.fst ]]; then
echo "FAIL: waveform not found" >&2
exit 1
fi
gen-test-plan-for-verilator-t1rocketemu:
if: '! github.event.pull_request.draft'
name: "[T1ROCKETEMU] Generate test plan"
runs-on: [self-hosted, linux, nixos]
outputs:
testplan: ${{ steps.get-all-configs.outputs.out }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: "get-all-configs"
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --caseDir verilator --top t1rocketemu)" > $GITHUB_OUTPUT
build-t1rocketemu-verilator-emulators:
name: "[T1RocketEmu] Build verilator trace emulators"
needs: [gen-test-plan-for-verilator-t1rocketemu]
runs-on: [self-hosted, linux, nixos, BIGRAM]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-test-plan-for-verilator-t1rocketemu.outputs.testplan) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Build T1RocketEmu verilator emulator"
run: |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.verilator-emu-trace' --impure --no-link --cores 64
nix build '.#t1.${{ matrix.config }}.t1rocketemu.run.mlir.hello.verilator-emu-trace' --impure
if [[ ! -r ./result/mlir.hello.fst ]]; then
echo "FAIL: waveform not found" >&2
exit 1
fi