-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
93 lines (85 loc) · 6 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
88
89
90
91
92
93
language: rust
sudo: required
dist: trusty
env:
global:
- secure: "YCOq0vX7+PsvQvoaanVTGrVepfnFJSUDvVRDoYGaXfeJQJaF1PBUbge9MF9WrRZT8J9wQ3QyoAuPaGEBH0Dr5MD8PVIP7n1BMh88Y49giF87A+H88pj953HqmJ94BfI16gjMsCYGOdSDBu2LFWIw6VzI8gxnQsa7QJ9JKzzSDX/HuyixAVr1HOSbTFHQmIkPLLQYJt7xJxouKGt3hztsx29RKH6P6/eiRB1prVA3uYlBCpsrpt3pBd+cJubDcA0nu0ZW7L3L3kIVp2QqgCfuuR3ktQQ7oYnhvAvGeQ5CnJZl4XoPc0s0lcqoGYefZhrA+Na23YjYHBTgdmh3qgXelF9+9SOKrYT6HTlnCk+SIQrPQSrOIUgJnE6BpyFWqlIDGyJjQnC7OVodAAyr82o+Bcoth17106jMordjVA6l8yZT6Cjx2ddfyb/b0vH6m6UumMwdgM9RLlJ5x+S6QppW+Qtm1U7FDZt0TO/MPxSYUWDmpO9GaFcKjCSyulpWS+mA1qyk0Q6a9fb1uqvjgZMvSgopw7Min+/0jpBh3DkwAjz8Amm1ZAuvEV7/8+a/QhluvSzjHAYzY4/E+qillNn/qJp2qST3pikCxbYiO7tP1mNEhR0u6T5XqjgtKQ5ALl3g/CQr7WZWF/NdRyLSkJvI2ULJmHsIIlcdwoF0FcHpEyc="
- secure: "dE+mh5SJ/Qac0J1QpVzUQwlzVDUWAROPEF3Pbv88wDkrFhM2qBBJKPHQ0IyHvHVvNhnxvYwEDNR79ejv7m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IEajgtyXF5I9FtOh3n5VOVhPwL+IonwHHIa58yUT4jsSnNlWbkHwOuHmE39yX4WkgmBURosGOPOxSLIpIdbRtQo7oWymIIhbXwZZEaUd7wVebusAe2RnlMNmlG6mfFs++T7h9KJVv5J7OjUMyzVmmc044Xo8kmUKsJN+Py0NrXoRkNZdRjznKAB61+Vmq7rBtiG4acYnoX0="
cache:
directories:
- "~/llvm"
matrix:
include:
- os: linux
rust: stable
- os: osx
osx_image: xcode8
rust: stable
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build_linux.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./build_osx.sh; fi
script: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export LLVM_CONFIG_PATH=/clang/bin/llvm-config
export LIBCLANG_STATIC_PATH=~/clang/lib
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export LLVM_CONFIG_PATH=/clang/bin/llvm-config
export LIBCLANG_STATIC_PATH=/clang/lib
fi
cargo build --verbose --release --features "clang_3_9 static"
RUST_TEST_THREADS=1 cargo test --verbose --features "clang_3_9 static"
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev &&
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
mkdir kcov-master/build &&
cd kcov-master/build &&
cmake .. &&
make &&
sudo make install &&
cd ../.. &&
RUST_TEST_THREADS=1 kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/cpp_codegen-*;
rm -rf master.tar.gz kcov-master
fi
before_deploy: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mv target/release/cpp_codegen target/release/cpp_codegen_linux;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mv target/release/cpp_codegen target/release/cpp_codegen_osx;
fi
deploy:
- provider: releases
api_key:
- secure: hEt0C0njTFYbJGWdC3gp0r+SmKC/rnhOi4OChc2p+bEH+2TIGltXxwyrwoicMikhHr2FhBwDiAgbEE85okcKxkYvBsAiH4PuiQBhzJq50QVHDcdW5HjZbBqWyYdANJrdkya68SbzjHKMSvf47W1HyX2uzGkEFSq4lp+GI8TZIZPy88XeHLOOT05XpBOJnOwIVpuH3ilP7bN1QeAM0OVc+aKJXYQkX5i0JG0eYnQXp8/QPfykmVXUSFzvDqP11eK+FPqtGbwKVkC9YpD9LtgOldylFTxJdWpa0UY05ttaKReaU2Ca7X0qIYn8/hG6GmI9PJNfj2awWczO4O2/1+mRxqbBDaW8syvXFoNRz0X54ZvWwJFLu3v3uTbUxnB0QwoV8s9mgRvaodw4idN2aBr141lHtjes8br+9QRRy74ND5Gg0eUFIG6NCaDnqDNIi+vyCNIB+d1ptMCXmOi+vazqrCjJ2oLeWULk29TDqyM5FIqxAdkADmHkSYA0rwzqHADMgaT5qhbBM/yGPgAySnvPxxTLAPQRUFW1SE9g/gQkSrivaJ58cxowCQXdmkb1M0E4MCaCkWP2UxYlr7fWEaVT2NyALFr98RD3nxVNUo+9mbRtqWx1JJuvzIPgCVdGGFUAB8DcBZNIBwKzHUDRmPqPmHwE9dl3qRoV5r4gjON3bdQ=
file: "target/release/cpp_codegen_linux"
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"
- provider: releases
api_key:
- secure: hEt0C0njTFYbJGWdC3gp0r+SmKC/rnhOi4OChc2p+bEH+2TIGltXxwyrwoicMikhHr2FhBwDiAgbEE85okcKxkYvBsAiH4PuiQBhzJq50QVHDcdW5HjZbBqWyYdANJrdkya68SbzjHKMSvf47W1HyX2uzGkEFSq4lp+GI8TZIZPy88XeHLOOT05XpBOJnOwIVpuH3ilP7bN1QeAM0OVc+aKJXYQkX5i0JG0eYnQXp8/QPfykmVXUSFzvDqP11eK+FPqtGbwKVkC9YpD9LtgOldylFTxJdWpa0UY05ttaKReaU2Ca7X0qIYn8/hG6GmI9PJNfj2awWczO4O2/1+mRxqbBDaW8syvXFoNRz0X54ZvWwJFLu3v3uTbUxnB0QwoV8s9mgRvaodw4idN2aBr141lHtjes8br+9QRRy74ND5Gg0eUFIG6NCaDnqDNIi+vyCNIB+d1ptMCXmOi+vazqrCjJ2oLeWULk29TDqyM5FIqxAdkADmHkSYA0rwzqHADMgaT5qhbBM/yGPgAySnvPxxTLAPQRUFW1SE9g/gQkSrivaJ58cxowCQXdmkb1M0E4MCaCkWP2UxYlr7fWEaVT2NyALFr98RD3nxVNUo+9mbRtqWx1JJuvzIPgCVdGGFUAB8DcBZNIBwKzHUDRmPqPmHwE9dl3qRoV5r4gjON3bdQ=
file: "target/release/cpp_codegen_osx"
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = osx"
after_deploy: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
git clone --quiet https://${GITHUB_VERSION_BUMP_API_KEY}@github.com/jupp0r/cpp-codegen-rs.git > /dev/null 2>&1 &&
cd cpp-codegen-rs &&
git checkout master &&
export LLVM_CONFIG_PATH=/clang/bin/llvm-config &&
export LIBCLANG_STATIC_PATH=~/clang/lib &&
cargo login ${CARGO_API_KEY} &&
sed -i "0,/version.*/s//version = \"${TRAVIS_TAG}\"/" Cargo.toml &&
git config --global user.email "[email protected]" &&
git config --global user.name "Travis CI" &&
git add Cargo.toml &&
git commit -m "Bump version to ${TRAVIS_TAG}" &&
cargo package &&
git push -u origin master > /dev/null 2>&1 &&
cargo publish
fi