-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
65 lines (65 loc) · 2.95 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
language: cpp
compiler:
- gcc
before_install:
- export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)"
- if [[ "$TRAVIS_COMMIT_MSG" = "$COMMIT_IGNORE_BUILD" ]]; then exit 0 ; fi
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
fi
- sudo apt-get update -qq
- git config --global user.email "$USER_EMAIL"
- git config --global user.name "$USER_NAME"
- git config --global push.default simple
- git checkout $TRAVIS_BRANCH
install:
- if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++
/usr/bin/g++-4.8 50; fi
- wget http://www.biicode.com/downloads/latest/ubuntu64
- mv ubuntu64 bii-ubuntu64.deb
- sudo dpkg -i bii-ubuntu64.deb && sudo apt-get -f install
- rm bii-ubuntu64.deb
- wget https://s3.amazonaws.com/biibinaries/thirdparty/cmake-3.0.2-Linux-64.tar.gz
- tar -xzf cmake-3.0.2-Linux-64.tar.gz
- sudo cp -fR cmake-3.0.2-Linux-64/* /usr
- rm -rf cmake-3.0.2-Linux-64
- rm cmake-3.0.2-Linux-64.tar.gz
- export TRAVIS_CXX=$CXX
script:
- cd /tmp
- bii init biicode_project
- mkdir -p ./biicode_project/blocks/$USER/$BLOCK_NAME
- cd biicode_project/blocks/$USER/$BLOCK_NAME
- shopt -s dotglob && mv $TRAVIS_BUILD_DIR/* ./
- if [ "$CXX" == "clang++" ]; then export CXX="clang++" && bii cpp:build; fi
- if [ "$CXX" == "g++" ]; then export CXX="g++" && bii cpp:build; fi
- cd /tmp/biicode_project
##################### CHANGE WITH YOUR CUSTOM CHECKS OR TEST EXECUTION ##################
- ls ./bin/lasote_docker_client_example_main
#########################################################################################
after_success:
- bii user $USER -p $BII_PASSWORD
- if [[ -n $TRAVIS_TAG ]]; then bii publish -r --tag STABLE --versiontag $TRAVIS_TAG
|| echo "Ignored publish output..."; fi
- if [[ -z $TRAVIS_TAG ]]; then bii publish -r || echo "Ignored publish output...";
fi
# If there are changes, commit them
- cd /tmp/biicode_project/blocks/$USER/$BLOCK_NAME
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git add -A .
- git commit -m "$COMMIT_IGNORE_BUILD"
- git remote -v
- git remote set-url origin https://github.com/$TRAVIS_REPO_SLUG.git
- git push
env:
global:
- USER_NAME="Luis Martinez de Bartolome"
- COMMIT_IGNORE_BUILD="Promoted version.***travis***"
- BLOCK_NAME=docker_client
- USER=lasote
# BII_PASSWORD: Biicode USER's password. > travis encrypt BII_PASSWORD=XXXXXX --add
- secure: K4oI72CcIcUBo3cb7DfhPoWSOEZxNzx8JOLpkZ/xOy3vFvXatvDP1KEpDvpirIGkueBuzhzMXXWE1wsefsbimh1PWSE5iyyF52aoWGuhKsjXt0/q80G2uwA/lcJIRJhJCH0m7QAsG8j054x06A+CJUHOsYCNKK3XUzE5ice+Dsc=
# GH_TOKEN: Github token > travis encrypt GH_TOKEN=XXXXXX --add
- secure: gNKs9E4Fh2agwqaGFTl1uzLvT+PrhykIi57eo9IkAlBuae/jOjAqxGua7NM7Rg+FxjLYh+wecPpO9DXsyNmeBjKpRN3AUmL6qTUgnVndxaRGV4avYpvnVymy6btqoyyBO3lm+wXgaKPtyp9NxjYhXbiQXnMC77yZOLC2k8BCRgk=