-
Notifications
You must be signed in to change notification settings - Fork 26
102 lines (87 loc) · 3.07 KB
/
build-and-test.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
name: Build and Test
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Build Dependencies
id: get-build-dependencies
uses: ./.github/actions/setup-accl-build-env
- name: Build Emulator
run: |
cd ${{ github.workspace }}/test/model/emulator && cmake . && make -j2
- name: Build Test
run: |
source /opt/xilinx/xrt/setup.sh
cd ${{ github.workspace }}/test/host/xrt && cmake . && make -j2
- name: Package Deb
run: |
mkdir accl && mkdir accl/DEBIAN
mkdir -p accl/usr/local/bin
mkdir -p accl/usr/lib
cp ${{ github.workspace }}/test/model/emulator/cclo_emu accl/usr/local/bin/
cp ${{ github.workspace }}/test/host/xrt/bin/test accl/usr/local/bin/accl_test
cp ${{ github.workspace }}/test/host/xrt/lib/libaccl.so accl/usr/lib/
echo "Package: accl" > accl/DEBIAN/control
echo "Version: 0.1" >> accl/DEBIAN/control
echo "Maintainer: Lucian Petrica" >> accl/DEBIAN/control
echo "Architecture: all" >> accl/DEBIAN/control
echo "Description: Testing package for ACCL" >> accl/DEBIAN/control
echo "Depends: libjsoncpp1, libzmqpp4, openmpi-bin, xrt" >> accl/DEBIAN/control
dpkg-deb --build accl
- name: Save Testing Artifacts
id: save-test-artifact
uses: actions/upload-artifact@v3
with:
name: testing-artifacts
path: accl.deb
test_dma:
runs-on: ubuntu-20.04
timeout-minutes: 10
needs: ["build"]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get Run Dependencies
id: get-run-dependencies
uses: ./.github/actions/setup-accl-run-env
- name: Run Test
run: |
source /opt/xilinx/xrt/setup.sh
ACCL_EMULATOR_PATH=/usr/local/bin/cclo_emu mpirun -np 1 --allow-run-as-root accl_test --startemu --udp --gtest_filter=-*perf_counter*
test_udp:
runs-on: ubuntu-20.04
timeout-minutes: 20
needs: ["build"]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get Run Dependencies
id: get-run-dependencies
uses: ./.github/actions/setup-accl-run-env
- name: Run Test
run: |
source /opt/xilinx/xrt/setup.sh
ACCL_EMULATOR_PATH=/usr/local/bin/cclo_emu mpirun -np 2 --allow-run-as-root accl_test --startemu --udp
test_tcp:
runs-on: ubuntu-20.04
timeout-minutes: 20
needs: ["build"]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get Run Dependencies
id: get-run-dependencies
uses: ./.github/actions/setup-accl-run-env
- name: Run Test
run: |
source /opt/xilinx/xrt/setup.sh
ACCL_EMULATOR_PATH=/usr/local/bin/cclo_emu mpirun -np 2 --allow-run-as-root accl_test --startemu --tcp