This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
132 lines (114 loc) · 4.37 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
name: ci
on:
# By default this will run when the activity type is "opened", "synchronize",
# or "reopened".
pull_request:
branches:
- development
- main
- "[0-9]+.[0-9]+" # Run on release branch, e.g. 1.0
# Run when protected branches are pushed to, e.g. via merge
push:
branches:
- development
- main
- "[0-9]+.[0-9]+" # Run on release branch, e.g. 1.0
workflow_dispatch:
defaults:
run:
shell: bash -il -eo pipefail {0}
jobs:
run_ci:
runs-on: [self-hosted, fpga]
steps:
- name: checkout_repo
uses: actions/checkout@v2
- name: pre-commit
run: pre-commit run --all-files
- name: show_details
run: |
echo 'pwd'
pwd
echo 'whoami'
whoami
echo 'hostname'
hostname
- name: prebuild_hexl-fpga
run: |
source /opt/intel/oneapi/setvars.sh
rm -rf build
rm -rf hexl-fpga-install
mkdir build
cmake -S . -B build -DCMAKE_CXX_COMPILER=dpcpp -DCMAKE_INSTALL_PREFIX=hexl-fpga-install -DCMAKE_BUILD_TYPE=Release -DENABLE_FPGA_DEBUG=OFF -DENABLE_TESTS=ON -DENABLE_BENCHMARK=ON
- name: build_host
run: |
source /opt/intel/oneapi/setvars.sh
cmake --build build --target hexl-fpga -j
- name: build_emulation
run: |
source /opt/intel/oneapi/setvars.sh
cmake --build build --target emulation -j
- name: build_install
run: |
cmake --install build
- name: run_test_fpga
run: |
source /opt/intel/oneapi/setvars.sh
export FPGA_DATA_DIR="/disk1/hexl-fpga-data-oneapi"
export KEYSWITCH_DATA_DIR="${FPGA_DATA_DIR}/test-vectors"
export RUN_CHOICE=2
export FPGA_BITSTREAM_DIR="${FPGA_DATA_DIR}/bitstreams"
cmake --build build --target tests
- name: run_test_emu
run: |
source /opt/intel/oneapi/setvars.sh
export FPGA_DATA_DIR="/disk1/hexl-fpga-data-oneapi"
export KEYSWITCH_DATA_DIR="${FPGA_DATA_DIR}/test-vectors"
export RUN_CHOICE=1
cmake --build build --target tests
- name: run_bench_fpga
run: |
source /opt/intel/oneapi/setvars.sh
export FPGA_DATA_DIR="/disk1/hexl-fpga-data-oneapi"
export FPGA_BITSTREAM_DIR="${FPGA_DATA_DIR}/bitstreams"
export KEYSWITCH_DATA_DIR="${FPGA_DATA_DIR}/test-vectors"
echo "Run benchmark with hardware bitstream"
cmake --build build --target bench
- name: build_examples
run: |
source /opt/intel/oneapi/setvars.sh
mkdir build-examples
cmake -S ./examples -B ./build-examples -DCMAKE_PREFIX_PATH=$(realpath .)/hexl-fpga-install/lib/cmake/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=dpcpp
cmake --build build-examples
- name: run_examples_fpga
run: |
source /opt/intel/oneapi/setvars.sh
aocl initialize acl0 pac_s10_usm
export FPGA_DATA_DIR="/disk1/hexl-fpga-data-oneapi"
export FPGA_KERNEL=DYADIC_MULTIPLY
export FPGA_BITSTREAM="${FPGA_DATA_DIR}/bitstreams/libdyadic_multiply.so"
export RUN_CHOICE=2
cmake --build build-examples --target examples
- name: build_experimental_bridges
run: |
pushd experimental/bridge-seal
cmake -S . -B build-seal4.0.0-fpga -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(realpath ${PWD}/../../hexl-fpga-install)" -DCMAKE_INSTALL_PREFIX=seal-fpga-install
cmake --build build-seal4.0.0-fpga -j
popd
- name: build_seal_based_test
run: |
source /opt/intel/oneapi/setvars.sh
pushd experimental/bridge-seal/tests
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(realpath ${PWD}/../../../hexl-fpga-install);$(realpath ${PWD}/../seal-fpga-install)"
cmake --build build -j
popd
- name: run_experimental_tests
run: |
source /opt/intel/oneapi/setvars.sh
pushd experimental/bridge-seal/tests
echo "Run experimental tests with FPGA bitstream"
export FPGA_DATA_DIR="/disk1/hexl-fpga-data-oneapi"
export FPGA_BITSTREAM_DIR="${FPGA_DATA_DIR}/bitstreams"
export RUN_CHOICE=2
cmake --build build --target seal_test
popd