-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
75 lines (72 loc) · 2.55 KB
/
circle.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
machine:
environment:
PATH: "$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$HOME/.local/lib"
LD_RUN_PATH: "$LD_RUN_PATH:$HOME/.local/lib"
DYLD_LIBRARY_PATH: "$DYLD_LIBRARY_PATH:$HOME/.local/lib"
LDFLAGS: "-L$HOME/.local/lib"
CPPFLAGS: "-I$HOME/.local/include"
CXXFLAGS: "-I$HOME/.local/include"
PKG_CONFIG_PATH: "$PKG_CONFIG_PATH:$HOME/.local/lib/pkgconfig"
RUSTC_DATE: "2017-03-28"
LOCAL_PREFIX: "$HOME/.local"
# used by cargo
LIBRARY_PATH: "$LIBRARY_PATH:$HOME/.local/lib"
RUST_TEST_THREADS: 1
RUST_BACKTRACE: 1
RUSTFLAGS: "-Dwarnings"
pre:
- |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y;
sudo apt-get update -y;
sudo apt-get install -y g++-4.8 zlib1g-dev libbz2-dev libsnappy-dev curl libdw-dev libelf-dev elfutils binutils-dev
post:
# Fixes: cargo under CircleCI
- sed -i 's/github/git-non-exist-hub/g' ~/.gitconfig
dependencies:
cache_directories:
- ~/.multirust
- ~/.cargo
- ~/.local
- target
pre:
# install rust/cargo
- |
if [[ ! -e $HOME/.cargo ]]; then
curl https://sh.rustup.rs -sSf |
sh -s -- --no-modify-path --default-toolchain "nightly-${RUSTC_DATE}" -y;
rustup default "nightly-${RUSTC_DATE}";
else
rustup default "nightly-${RUSTC_DATE}";
fi
- test -e $HOME/.cargo/bin/cargo-fmt || cargo install --force --vers =0.6.0 rustfmt || true
- |
if [[ ! -e $HOME/.local/lib/libgflags.a ]]; then
cd /tmp && \
curl -L https://github.com/gflags/gflags/archive/v2.1.2.tar.gz -o gflags.tar.gz && \
tar xf gflags.tar.gz && \
cd gflags-2.1.2 && \
cmake -DCMAKE_INSTALL_PREFIX=${LOCAL_PREFIX} . && \
make -j && \
make install;
fi
- |
if [[ ! -e $HOME/.local/lib/librocksdb.so ]]; then
export CPLUS_INCLUDE_PATH="${LOCAL_PREFIX}/include" && \
cd /tmp && \
curl -L https://github.com/facebook/rocksdb/archive/v5.0.1.tar.gz -o rocksdb.tar.gz && \
tar xf rocksdb.tar.gz && \
cd rocksdb-5.0.1 && \
INSTALL_PATH=${LOCAL_PREFIX} make -j install-shared;
fi
post:
# cargo test also use debug
- cargo build:
timeout: 1800
- cargo test --features "default" --no-run:
timeout: 1800
test:
override:
- make format && git diff-index --quiet HEAD -- || (echo please make format before creating a pr!; exit 1)
- cargo test --features "default" -- --nocapture
- cargo test --features "default" --bench benches -- --nocapture