forked from usnistgov/NFIQ2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (78 loc) · 2.31 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
language: cpp
jobs:
include:
- os: osx
osx_image: xcode10.3
env: BITS_64=ON BITS_32=OFF CONFIGURATION_TYPE="Release" BUILD_NFIQ2_CLI=OFF CHECK_STYLE=OFF
compiler: clang
- os: osx
osx_image: xcode9.4
env: BITS_64=ON BITS_32=OFF CONFIGURATION_TYPE="Release" BUILD_NFIQ2_CLI=OFF CHECK_STYLE=OFF
compiler: clang
addons:
apt:
packages:
- libdb++-dev
- libhwloc-dev
- libjpeg-dev
- libopenjp2-7-dev
- libpng-dev
- libsqlite3-dev
- libssl-dev
- libtiff-dev
- zlib1g-dev
homebrew:
packages:
- clang-format
- berkeley-db
- hwloc
- jpeg-turbo
- libpng
- libtiff
- openjpeg
- openssl
- sqlite
- zlib
before_install:
- |
if [ "${CHECK_STYLE}" == "ON" ] ; then
echo -n "Checking coding style with clang-format..."
fail=0
while read -r i; do
if ! clang-format --Werror --dry-run "${i}" > /dev/null 2>&1;
then
if [ "${fail}" == "0" ]; then
echo "[FAIL]"
fi
fail=1
echo "Please run clang-format -i ${i}"
fi
done < <(find NFIQ2 \( -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" \) -a \! -path '*wsq*' \
-a \! -name 'RandomForestTrainedParams.h')
if [ "${fail}" == "1" ]; then
msg="Please run the above files through clang-format using the "
msg+=".clang-format configuration and push your changes to the "
msg+="same branch. See CONTRIBUTING.md for more information."
echo "${msg}"
exit 1
else
echo "[OKAY]"
fi
fi
before_script:
- mkdir -p build
- cd build
- cmake -D32BITS=$BITS_32 -D64BITS=$BITS_64 -DCMAKE_BUILD_TYPE="$CONFIGURATION_TYPE" -DBUILD_NFIQ2_CLI=$BUILD_NFIQ2_CLI ..
script:
- cmake --build .
cache:
timeout: 1000
directories:
- $HOME/build/usnistgov/NFIQ2/build/OpenCV-prefix
- $HOME/build/usnistgov/NFIQ2/build/fingerjetfxose
- $HOME/build/usnistgov/NFIQ2/build/biomdi
- $HOME/build/usnistgov/NFIQ2/build/libbiomeval-prefix
- $HOME/Library/Caches/Homebrew
before_cache:
- which brew && brew cleanup