-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
65 lines (57 loc) · 1.94 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
sudo: false
notifications:
email: false
cache:
pip: true
directories:
- download-cache
env:
global:
- ARGON2_VERSION=20190702
- ARGON2_DIR=$HOME/argon2
- LUA="luajit 2.0"
matrix:
- LINT=1
- LUA="luajit 2.1"
- LUA="luajit 2.1" ARGON2_VERSION=20161029
- LUA="luajit 2.1" ARGON2_VERSION=20171227
- LUA="luajit 2.1" ARGON2_VERSION=HEAD
matrix:
fast_finish: true
allow_failures:
- env: LUA="luajit 2.1" ARGON2_VERSION="HEAD"
before_install:
- mkdir -p download-cache
- pushd download-cache
- if [ ! -d phc-winner-argon2 ]; then git clone https://github.com/P-H-C/phc-winner-argon2.git; fi
- pushd phc-winner-argon2
- git checkout master
- git pull
- if [ "$ARGON2_VERSION" != "HEAD" ]; then git checkout $ARGON2_VERSION; fi
- make > build.log 2>&1 || (cat build.log && exit 1)
- make test > build.log 2>&1 || (cat build.log && exit 1)
- make install PREFIX="$ARGON2_DIR" LIBRARY_REL=lib > build.log 2>&1 || (cat build.log && exit 1)
- if [ "$ARGON2_VERSION" == "20161029" ]; then ln -s $ARGON2_DIR/lib/libargon2.so $ARGON2_DIR/lib/libargon2.so.0; fi
- popd
- popd
- pip install --user hererocks cpp-coveralls > build.log 2>&1 || (cat build.log && exit 1)
- hererocks lua_install -r^ --$LUA > build.log 2>&1 || (cat build.log && exit 1)
- export PATH=$PATH:$PWD/lua_install/bin
- luarocks install busted > build.log 2>&1 || (cat build.log && exit 1)
- luarocks install luacheck > build.log 2>&1 || (cat build.log && exit 1)
- luarocks install luacov-coveralls > build.log 2>&1 || (cat build.log && exit 1)
- export LD_LIBRARY_PATH="$ARGON2_DIR/lib"
install:
- luarocks make
script:
- >
if [ -n "$LINT" ]; then
make lint
else
busted --exclude-tags=JIT -v --coverage -o gtest --repeat 3
if [ "$LUA" = "luajit 2.1" ]; then
busted -v -o gtest --tags JIT
fi
fi
after_success:
- if [ -z "$LINT" ]; then luacov-coveralls -i ./src/argon2.lua fi