-
Notifications
You must be signed in to change notification settings - Fork 41
137 lines (136 loc) · 4.05 KB
/
main.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
on:
- push
jobs:
build:
runs-on: ubuntu-latest
name: Build LSOracle
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
env:
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "6"
CCACHE_MAXSIZE: "400M"
CCACHE_LOGFILE: ccache_log
CCACHE_DIR: /__w/LSOracle/.ccache
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
submodules: recursive
- name: Load ccache
uses: actions/cache@v2
with:
path: |
/__w/LSOracle/.ccache
key: cicd_testing_build
- name: Build
run: |
ccache -p
ccache -z
cmake -B build . -D CMAKE_BUILD_TYPE=RELEASE -D YOSYS_INCLUDE_DIR=/yosys -D YOSYS_PLUGIN=ON -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON
cmake --build build
ccache -s
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-binary
path: build/core/lsoracle
- name: Upload plugin artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-plugin
path: build/yosys-plugin/oracle.so
- name: Upload unit test artifacts
uses: actions/upload-artifact@v2
with:
name: lsoracle-tests
path: build/core/unit_tests
test:
runs-on: ubuntu-latest
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
needs: build
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get binaries
uses: actions/[email protected]
with:
name: lsoracle-tests
- name: Unit Tests
run: |
chmod +x unit_tests
./unit_tests
benchmark:
runs-on: ubuntu-latest
name: Benchmarks
container: ghcr.io/lnis-uofu/lsoracle-benchmarks:jammy
needs: build
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Get binaries
uses: actions/[email protected]
with:
name: lsoracle-binary
- name: Get plugin
uses: actions/[email protected]
with:
name: lsoracle-plugin
# - name: Prep previous
# run: |
# mkdir -p benchmarks/previous
- name: Run synthesis
run: |
ls
cp lsoracle /usr/local/bin
chmod +x /usr/local/bin/lsoracle
mkdir -p /usr/local/share/lsoracle
mkdir -p /usr/local/share/yosys/plugins
cp oracle.so /usr/local/share/yosys/plugins/
cd benchmarks
make everything.tsv -j $(nproc)
- name: Archive results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: |
benchmarks/everything.tsv
benchmarks/*/*.log
benchmarks/*/*.rtl
benchmarks/*/*.v
benchmarks/*/*.json
benchmarks/*/*.gates
benchmarks/*/*.sdc
#- name: Get previous results
# uses: dsaltares/fetch-gh-release-asset@master
# with:
# version: tags/cicd_test
# file: "everything.tsv"
# target: "benchmarks/previous/everything.tsv"
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Render results
continue-on-error: true
run: |
cd benchmarks
make sky130_fd_sc_hd__tt_025C_1v80.pdf
- name: Archive graph
uses: actions/upload-artifact@v2
with:
name: benchmark-graphs
path: |
benchmarks/sky130_fd_sc_hd__tt_025C_1v80.pdf
- name: Publish results
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
benchmarks/everything.tsv
benchmarks/sky130_fd_sc_hd__tt_025C_1v80.pdf
benchmarks/*/*.log
benchmarks/*/*.rtl
benchmarks/*/*.v
benchmarks/*/*.json
benchmarks/*/*.gates
benchmarks/*/*.sdc
prerelease: true