-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
103 lines (100 loc) · 2.8 KB
/
.travis.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
---
language: cpp
matrix:
include:
# Ubuntu 20.04 + gcc on amd64
- arch: amd64
os: linux
dist: focal
compiler: gcc
# Ubuntu 20.04 + clang on amd64
- arch: amd64
os: linux
dist: focal
compiler: clang
# Ubuntu 18.04 + gcc on amd64
- arch: amd64
os: linux
dist: bionic
compiler: gcc
# Ubuntu 18.04 + clang on amd64
- arch: amd64
os: linux
dist: bionic
compiler: clang
# Ubuntu 16.04 + gcc on amd64
- arch: amd64
os: linux
dist: xenial
compiler: gcc
# Ubuntu 16.04 + clang on amd64
- arch: amd64
os: linux
dist: xenial
compiler: clang
# Ubuntu 20.04 + gcc on ppc64le
- arch: ppc64le
os: linux
dist: focal
compiler: gcc
# Ubuntu 20.04 + clang on ppc64le
- arch: ppc64le
os: linux
dist: focal
compiler: clang
# Ubuntu 18.04 + gcc on ppc64le
- arch: ppc64le
os: linux
dist: bionic
compiler: gcc
# Ubuntu 18.04 + clang on ppc64le
- arch: ppc64le
os: linux
dist: bionic
compiler: clang
# Ubuntu 16.04 + gcc on ppc64le
- arch: ppc64le
os: linux
dist: xenial
compiler: gcc
# Ubuntu 16.04 + clang on ppc64le
- arch: ppc64le
os: linux
dist: xenial
compiler: clang
before_install:
- |
# For cryptodev-linux
if ! ( [[ "$(uname -p)" == "ppc64le" ]] && ( [[ "$(lsb_release -rs)" == "18.04" ]] || [[ "$(lsb_release -rs)" == "20.04" ]] ) ); then
sudo apt-get -y install "linux-headers-$(uname -r)"
fi
# For lib842
sudo apt-get -y install libnuma-dev opencl-headers ocl-icd-opencl-dev
# Rely on POCL to provide a generic OpenCL implementation that can run the tests
# Unfortunately however, it is not available on Ubuntu 16.04, only on Ubuntu 18.04/20.04
# It is also not available on ppc64le
if ( ! [[ "$(uname -p)" == "ppc64le" ]] ) && ( [[ "$(lsb_release -rs)" == "18.04" ]] || [[ "$(lsb_release -rs)" == "20.04" ]] ); then
sudo apt-get -y install pocl-opencl-icd
fi
script:
- |
# Build cryptodev-linux dependency (for using the kernel's 842 support)
if ! ( [[ "$(uname -p)" == "ppc64le" ]] && ( [[ "$(lsb_release -rs)" == "18.04" ]] || [[ "$(lsb_release -rs)" == "20.04" ]] ) ); then
git clone https://github.com/plauth/cryptodev-linux
cd cryptodev-linux
make -j"$(nproc)"
sudo make install
sudo depmod -a
sudo modprobe cryptodev
cd ..
fi
# Build lib842
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j"$(nproc)"
# Run tests
if ( ! [[ "$(uname -p)" == "ppc64le" ]] ) && ( [[ "$(lsb_release -rs)" == "18.04" ]] || [[ "$(lsb_release -rs)" == "20.04" ]] ); then
ctest
else
ctest -E '.*_cl.*'
fi