-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
66 lines (63 loc) · 2.05 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
machine:
environment:
PATH: "$HOME/.local/cmake/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
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"
RUSTC_DATE: "2018-01-12"
LOCAL_PREFIX: "$HOME/.local"
# used by cargo
RUST_TEST_THREADS: 1
RUST_BACKTRACE: 1
RUSTFLAGS: "-Dwarnings"
FAIL_POINT: 1
pre:
- |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y;
sudo apt-get update -y;
sudo apt-get install -y g++-4.8 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 [[ ! -f $HOME/.local/cmake/bin/cmake ]]; then
curl https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz -sSf | tar xzf -;
rm -rf $HOME/.local/cmake
mv cmake-3.10.0-Linux-x86_64 $HOME/.local/cmake
fi
- |
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
- make -f ci-build/Makefile prepare-rustfmt
- |
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
post:
# check format first
- make format && git diff-index --quiet HEAD -- || (git diff; echo please make format and run tests before creating a PR!; exit 1)
test:
override:
- make trace_test:
timeout: 1800