-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
67 lines (59 loc) · 4.25 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
language: rust
rust:
- stable
- beta
- nightly
cache:
apt: true
env:
global:
- PATH="$HOME/bin:$PATH"
- CMAKE_VERSION_PREFIX=3.7
- CMAKE_VERSION_FULL=3.7.2
addons:
apt:
packages:
- libxmu-dev
- libgl1-mesa-dev
sources:
- r-packages-precise
deploy:
provider: releases
api_key:
secure: d8kv/8cjJIZ+fQ0Uih7q/FeAm869eExjUFW6vSwAHloT2CXYX5sb7X4ynU4usZXjWt/puFLrWzrA4t9Cl3vOnBxE7bLi7WFjS1JfZEmq9sFq62q68uOZbn1hkOORyXWqXjXftGkd66B+gULzkcmxruajQlwFDGeIu4xVmBpkzZ9SGpSyGlFJ1gnouKOVMRzmKI1+XwrdfGmyURc1KsOs2a6K1wP9bB+31qxg+shxA/vEmaKM02MNu+7KVOJWiWybPo0zburt9I6CFHexww3d1oG2aSbT1QH44KrXrms/bsBD7GIQriz5jQTPhe83VxCOzZiADQF/OiU5P0vGtpi+PYk3irdltOhaqyLYYAr4k9bkMFHlJw2TfWKUwfohYX5FmwwCIhkVO3SR3BQAD2UeBGim0PnadEhoiKoyYS9eEaWGT20C4EwF/cwr48ej6IaCu6l5xNoJOrYA/Mo9j/XnxBqpFWbGdI0CuAlENvMpfzzxDrBXnubLE9HMebbukmD+cTLA0zcuC8USO3BvN6Wz11lMTGVr/9S7jmutJHS+RrezqW3Ce07lZtkL92K2Kjhw3lGV23r7dPSFanMYxqoSr/8hayQKYxHbI6gpMVsB0cwh7eLiJIIjHtG7nw1EgyiEjMIQDtv6J7D74LzV3XjFOHNl2GXHFBksxp7syZNxqrQ=
file: "$HOME/lib/libBearLibTerminal.so"
skip_cleanup: true
on:
tags: true
before_install:
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
openssl aes-256-cbc -K $encrypted_2620d498bbb7_key -iv $encrypted_2620d498bbb7_iv -in gh_rsa.enc -out gh_rsa -d;
fi
install:
- mkdir -p /tmp/tools
- pushd /tmp/tools
- if [[ ! -f "cmake-$CMAKE_VERSION_FULL-Linux-x86_64.sh" ]]; then
curl -SOL "https://cmake.org/files/v$CMAKE_VERSION_PREFIX/cmake-$CMAKE_VERSION_FULL-Linux-x86_64.sh";
chmod +x "cmake-$CMAKE_VERSION_FULL-Linux-x86_64.sh";
fi
- ./"cmake-$CMAKE_VERSION_FULL-Linux-x86_64.sh" --prefix="$HOME" --exclude-subdir --skip-license
- popd
-
- git clone https://github.com/nabijaczleweli/BearLibTerminal ~/BearLibTerminal && cd ~/BearLibTerminal/Build
- cmake -G"Unix Makefiles" .. && make BearLibTerminal
- mkdir ~/lib/ && cp ../Output/Linux64/libBearLibTerminal.so ~/lib/ && cd $TRAVIS_BUILD_DIR
script:
- LD_LIBRARY_PATH=~/lib LIBRARY_PATH=~/lib cargo build --verbose
- LD_LIBRARY_PATH=~/lib LIBRARY_PATH=~/lib cargo test --verbose
after_success:
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then echo "Update docs for commits $TRAVIS_COMMIT_RANGE" > $TRAVIS_BUILD_DIR/../DOC_UPDATE_MSG; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then echo >> $TRAVIS_BUILD_DIR/../DOC_UPDATE_MSG; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then git log $TRAVIS_COMMIT_RANGE --pretty=oneline >> $TRAVIS_BUILD_DIR/../DOC_UPDATE_MSG; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then mkdir -p ~/.ssh && cp gh_rsa ~/.ssh/id_rsa && chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then git clone -b doc [email protected]:nabijaczleweli/BearLibTerminal.rs.git $TRAVIS_BUILD_DIR-doc; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then ln -s $TRAVIS_BUILD_DIR-doc target/doc; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then LIBRARY_PATH=~/lib cargo doc; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then cd $TRAVIS_BUILD_DIR-doc; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then git config --global user.email "[email protected]" && git config --global user.name "Nabijaczleweli Autouploader Bot" && git config --global push.default simple; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then git add * && git commit -F $TRAVIS_BUILD_DIR/../DOC_UPDATE_MSG; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_RUST_VERSION" == "stable" ]; then git push && cd $TRAVIS_BUILD_DIR; fi