forked from seandepagnier/climatology_pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (69 loc) · 2.29 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
language: cpp
matrix:
include:
- dist: trusty
compiler: gcc
- os: osx
compiler: clang
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
sudo apt-get -qq update;
sudo apt-get install libwxgtk3.0-dev libwxgtk3.0-0 libgps-dev libglu1-mesa-dev libgtk2.0-dev libbz2-dev libtinyxml-dev;
sudo apt-get install rpm;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
brew install cairo libexif xz libarchive;
wget http://opencpn.navnux.org/build_deps/wx312_opencpn50_macos109.tar.xz;
tar xJf wx312_opencpn50_macos109.tar.xz -C /tmp;
export PATH="/usr/local/opt/gettext/bin:$PATH";
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile;
wget http://opencpn.navnux.org/build_deps/Packages.dmg;
hdiutil attach Packages.dmg;
sudo installer -pkg "/Volumes/Packages 1.2.5/Install Packages.pkg" -target "/";
fi
script:
- if [[ "${COVERITY_SCAN_BRANCH}" == 1 ]];
then
echo "Don't build on coverty_scan branch.";
exit 0;
fi
- mkdir build && cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
cmake -DCMAKE_BUILD_TYPE=Release ../ && make -sj2 && sudo make package;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
cmake -DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx312_opencpn50_macos109/bin/wx-config -DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx312_opencpn50_macos109" -DCMAKE_INSTALL_PREFIX=/tmp/opencpn -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 .. && make -sj2 && make create-pkg;
fi
- ls -l;
notifications:
email: false
git:
depth: 10
before_install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
# Set encrypted variable 'GitHub_auth_token' in Travis repo settings to deploy packages
# for tagged commits to GitHub Releases.
deploy:
- provider: releases
api_key: $GitHub_auth_token
file_glob: true
file: $TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,txz,pkg.tar.xz}
skip_cleanup: true
on: # Set deploy conditions
# Deploy only when tag is specified
tags: true
# or his branch
branch: dev
# and only when API token is set
condition: "${#GitHub_auth_token} != 0"