-
Notifications
You must be signed in to change notification settings - Fork 37
142 lines (112 loc) · 4.23 KB
/
ci.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
name: Build ETISS and run smoke tests
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build_etiss:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: etiss_source
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev \
llvm-11-dev libclang-11-dev clang-11
- name: CMake config
run: |
cmake -B etiss_build -S etiss_source -DCMAKE_INSTALL_PREFIX=etiss_prebuilt -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: CMake build
run: |
cmake --build etiss_build -j$(nproc)
- name: CMake install
run: |
cmake --build etiss_build --target install
- name: Upload compiled ETISS
uses: actions/upload-artifact@v4
with:
name: etiss_prebuilt
path: etiss_prebuilt
build_examples:
runs-on: ubuntu-22.04
strategy:
matrix:
bits: ["32", "64"]
steps:
- uses: actions/checkout@v4
with:
repository: tum-ei-eda/etiss_riscv_examples
path: examples_source
- name: Install cross compiler
run: |
wget https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz
tar xf xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz
mv xpack-riscv-none-elf-gcc-13.2.0-2 riscv_tc
- name: Configure examples
run: |
cmake -B examples_build_rv${{matrix.bits}} -S examples_source -DCMAKE_TOOLCHAIN_FILE=rv${{matrix.bits}}gc-toolchain.cmake -DRISCV_TOOLCHAIN_BASENAME=riscv-none-elf -DRISCV_TOOLCHAIN_PREFIX=$GITHUB_WORKSPACE/riscv_tc -DCMAKE_INSTALL_PREFIX=examples_prebuilt_rv${{matrix.bits}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build examples
run: |
cmake --build examples_build_rv${{matrix.bits}} -j$(nproc)
- name: Install examples
run: |
cmake --build examples_build_rv${{matrix.bits}} --target install
- name: Upload prebuilt examples
uses: actions/upload-artifact@v4
with:
name: examples_prebuilt_rv${{matrix.bits}}
path: examples_prebuilt_rv${{matrix.bits}}
run_examples:
runs-on: ubuntu-22.04
needs: [build_etiss, build_examples]
strategy:
matrix:
bits: ["32", "64"]
jit_engine: ["TCC", "GCC", "LLVM"]
test_program: ["example_c", "example_cpp", "test_cases"]
steps:
- name: Fetch precompiled artifacts
uses: actions/download-artifact@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libllvm11
- name: Run test
run: |
chmod +x etiss_prebuilt/bin/bare_etiss_processor
etiss_prebuilt/bin/bare_etiss_processor -iexamples_prebuilt_rv${{matrix.bits}}/ini/${{matrix.test_program}}.ini --jit.type=${{matrix.jit_engine}}JIT
run_benchmarks:
runs-on: ubuntu-22.04
needs: [build_etiss, build_examples]
strategy:
matrix:
bits: ["32", "64"]
jit_engine: ["TCC", "GCC", "LLVM"]
run_no: [1, 2, 3, 4, 5]
steps:
- name: Fetch precompiled artifacts
uses: actions/download-artifact@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libllvm11
- name: Run benchmark
run: |
chmod +x etiss_prebuilt/bin/bare_etiss_processor
etiss_prebuilt/bin/bare_etiss_processor -iexamples_prebuilt_rv${{matrix.bits}}/ini/dhry.ini --jit.type=${{matrix.jit_engine}}JIT --vp.stats_file_path=${{github.workspace}}/run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}.json
- name: Save Benchmark results
uses: actions/upload-artifact@v4
with:
name: run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}
path: run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}.json
merge_benchmark_results:
runs-on: ubuntu-22.04
needs: run_benchmarks
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dhry_results
pattern: run_*
delete-merged: true