forked from Blaok/soda
-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (81 loc) · 2.68 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
name: CI
on:
- push
jobs:
unit-test:
name: Unit Test
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout myself
uses: actions/checkout@v2
- name: Install myself
run: python -m pip install .
working-directory: src
- name: Run unit tests
run: python -m unittest discover --start-directory src
integration-test:
if: github.event_name == 'push' && github.repository == 'UCLA-VAST/soda'
name: Integration Test
runs-on:
- self-hosted
- Linux
- intel-tools
- xilinx-tools
strategy:
matrix:
aocl-version:
- "20.3"
xocl-version:
- "2020.2"
python-version:
- "3.8"
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout myself
uses: actions/checkout@v2
- name: Install myself
run: python -m pip install .
working-directory: src
- name: Set up vendor tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
xilinx-u250-xdma-dev \
curl https://raw.githubusercontent.com/Blaok/fpga-runtime/master/install.sh | bash
curl https://raw.githubusercontent.com/Blaok/tapa/master/install.sh | bash
sudo cp /opt/tools/intel/intelFPGA_pro/${{ matrix.aocl-version }}/hld/Altera.icd /etc/OpenCL/vendors/
cat >tests/env.sh <<'EOF'
source /opt/tools/intel/intelFPGA_pro/${{ matrix.aocl-version }}/hld/init_opencl.sh
# Cannot source Xilinx scripts here because they mess up many system libraries.
export XILINX_VIVADO="/opt/tools/xilinx/Vivado/${{ matrix.xocl-version }}"
export XILINX_VITIS="/opt/tools/xilinx/Vitis/${{ matrix.xocl-version }}"
export PATH="${XILINX_VITIS}/bin:${PATH}"
export XCL_PLATFORM=xilinx_u250_xdma_201830_2
EOF
- name: Run kernel compilation tests
run: tests/test-kernel-compilation.sh
- name: Run C++ host tests
run: tests/test-cpp-host.sh
- name: Run FRT host tests
run: tests/test-frt-host.sh
- name: Run clustering tests
run: |
tests/test-cluster.sh fine
tests/test-cluster.sh coarse
tests/test-cluster.sh full
- name: Run RTL simulation tests
run: tests/test-rtl-sim.sh