forked from supranational/blst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (60 loc) · 1.67 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
branches:
only:
- /.*/
language: rust
git:
quiet: true
os:
- linux
- osx
arch:
- arm64
- s390x
before_script:
- env | sort
script:
- if [ "$TRAVIS_LANGUAGE" = "rust" ]; then
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
rustup set default-host x86_64-pc-windows-msvc;
export ML=-nologo;
fi;
( cd bindings/rust;
if [ -f target/Cargo.lock ]; then
mv -f target/Cargo.lock .;
fi;
NOW=`date +%s`;
REF=.cargo/registry/index/*/.last-updated;
THEN=`(stat -c %Y "$TRAVIS_HOME"/$REF || stat -f %m "$TRAVIS_HOME"/$REF) 2>/dev/null`;
if [ $(($NOW - ${THEN:-0})) -gt 604800 ]; then
cargo update;
fi;
cargo test --release )
fi
- if which go > /dev/null 2>&1; then
go version;
if ! (grep -q -e '^flags.*\badx\b' /proc/cpuinfo) 2>/dev/null; then
export CGO_CFLAGS="-O -D__BLST_PORTABLE__";
fi;
(cd bindings/go; go test -test.v)
fi
matrix:
include:
- os: linux
arch: arm64
language: go
notifications:
email: false
before_cache:
- if [ "$TRAVIS_LANGUAGE" = "rust" ]; then
( cd bindings/rust;
cargo clean -p blst; cargo clean -p blst --release;
rm -rf target/.rustc_info.json;
rm -rf target/{debug,release}/incremental;
mv -f Cargo.lock target )
fi
- (cd "$TRAVIS_HOME"; rm -rf .cargo/registry/src)
- (cd "$TRAVIS_HOME"; rm -rf .cargo/registry/index/*/.cache)
cache:
cargo: true
directories:
- bindings/rust/target