-
Notifications
You must be signed in to change notification settings - Fork 52
158 lines (134 loc) · 4.04 KB
/
rust.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
name: Test
on: [push]
# Ensures that only the latest commit of a PR can execute the actions.
# Useful for cancelling job when a sequence of commits are quickly added.
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
interpreter:
name: Test Interpreter
runs-on: ubuntu-latest
container: ghcr.io/cucapra/calyx:0.3.0
steps:
- name: Copy fud configuration
run: |
mkdir -p $HOME/.config
cp -r /root/.config/* $HOME/.config
- name: Update Dahlia
working-directory: /home/dahlia
run: |
git pull
sbt "; assembly"
- name: Checkout commit that triggered run
working-directory: /home/calyx
run: |
git fetch --all
git checkout $GITHUB_SHA
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --manifest-path /home/calyx/interp/Cargo.toml
- name: Runt tests
working-directory: /home/calyx
run: |
# Run the remaining tests
runt interp -x 'relay' -d -o fail
- name: Source code tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path /home/calyx/interp/Cargo.toml
- name: Source code doc tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path /home/calyx/interp/Cargo.toml --doc
compiler:
name: Test Compiler
runs-on: ubuntu-latest
container: ghcr.io/cucapra/calyx:0.3.0
steps:
- name: Copy fud configuration
run: |
mkdir -p $HOME/.config
cp -r /root/.config/* $HOME/.config
- name: Update Dahlia
working-directory: /home/dahlia
run: |
git pull
sbt "; assembly"
- name: Checkout commit that triggered run
working-directory: /home/calyx
run: |
git fetch --all
git checkout $GITHUB_SHA
- name: Install calyx-py & MrXL
working-directory: /home/calyx
run: |
cd calyx-py
FLIT_ROOT_INSTALL=1 flit install --symlink
cd -
cd frontends/mrxl
FLIT_ROOT_INSTALL=1 flit install --symlink
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path /home/calyx/Cargo.toml
# - name: Source code doc tests
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --manifest-path /home/calyx/calyx/Cargo.toml --doc lib
- name: Runt tests
working-directory: /home/calyx
run: |
runt -x 'cocotb' -d -o fail -j 1 --max-futures 5
# Run these sequentially because they might fail intermittently
- name: Cocotb tests
working-directory: /home/calyx
run: |
runt -i 'cocotb' -d -o fail -j 1 --max-futures 1
- name: Run Python Tests
working-directory: /home/calyx
run: pytest fud/fud/stages/verilator/tests/numeric_types.py
evaluation:
name: Polybench Integration
runs-on: ubuntu-latest
container: ghcr.io/cucapra/calyx:0.3.0
steps:
- name: Copy and clean up fud configuration
run: |
mkdir -p $HOME/.config
cp -r /root/.config/* $HOME/.config
- name: Update Dahlia
working-directory: /home/dahlia
run: |
git pull
sbt "; assembly"
- name: Checkout commit that triggered run
working-directory: /home/calyx
run: |
git fetch --all
git checkout $GITHUB_SHA
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path /home/calyx/Cargo.toml
- name: Checkout calyx-evaluation
working-directory: /home
run: |
git clone https://github.com/cucapra/calyx-evaluation.git calyx-evaluation
- name: Run benchmarks
working-directory: /home/calyx-evaluation/benchmarks
run: |
unset JAVA_TOOL_OPTIONS
# Run the main benchmarks
runt -i Correctness -d
# Run the unrolled benchmarks
runt -i Unrolled -d
# Run the interpreter benchmarks
# runt -i Interpreter -d