forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
62 lines (53 loc) · 4.36 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
language: cpp
matrix:
include:
- dist: trusty
compiler: gcc
- os: osx
compiler: clang
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then grep -q precise /etc/lsb-release && sudo add-apt-repository -y ppa:wxformbuilder/wxwidgets || true; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi
# Homebrew upgrade disabled to save time
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get --allow-unauthenticated install libwxgtk3.0-dev libwxgtk3.0-0 libgps-dev libglu1-mesa-dev libgtk2.0-dev libbz2-dev libtinyxml-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libarchive-dev liblzma-dev libexif-dev libsqlite3-dev gettext; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install wxmac --devel; fi
# We do not use wxmac, everything comes in the prebuilt tarball downloaded bellow
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cairo libexif libarchive; wget http://opencpn.navnux.org/build_deps/cairo_macos107.tar.xz; tar xJf cairo_macos107.tar.xz -C /tmp; wget http://opencpn.navnux.org/build_deps/wx_opencpn_macos107.tar.xz; tar xJf wx_opencpn_macos107.tar.xz -C /tmp; wget http://opencpn.navnux.org/build_deps/libarchive_macos107.tar.xz; tar xJf libarchive_macos107.tar.xz -C /tmp; export PATH="/usr/local/opt/gettext/bin:$PATH"; echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile; fi
# We install cairo and libarchive from Homebrew to pull in the dependencies, but use the custom Lion compatible build later.
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=Debug ..; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake -DOCPN_USE_LIBCPP=ON -DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx_opencpn_macos107/bin/wx-config -DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx_opencpn_macos107" -DLibArchive_INCLUDE_DIR=/tmp/libarchive_macos107/include -DLibArchive_LIBRARY=/tmp/libarchive_macos107/lib/libarchive.dylib -DCAIRO_INCLUDE_DIR=/tmp/cairo_macos107/include -DCAIRO_LIBRARY=/tmp/cairo_macos107/lib/libcairo.dylib -DCMAKE_INSTALL_PREFIX=/tmp/opencpn ..; fi
- make -s
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/; chmod 644 /usr/local/lib/lib*.dylib; cp /tmp/libarchive_macos107/lib/libarchive.16.dylib /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/; cp /tmp/cairo_macos107/lib/libcairo.2.dylib /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/; make install; make create-dmg; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make package; fi
notifications:
email: false
git:
depth: 10
env:
global:
- MAKEFLAGS="-j2"
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "pje0YVgQOgeQi9lNWN+S1rTVcStL4z09piLYJKYibxGm8kVgJNm8z0/5rbyBVo0gVwRB/sNJGKEcMw5LJk1TLQ1P+tNO4Psg+XTcDYKEi52GYjzEEBjX4cOp36owU4sJG8zBxzgthG8b/Hhf+GDWDWs262uP+dwfaR477/gaArerEkuDSlvcjpAiB4bT4b8992sEZabaZkfBpj8dIP9G74MgAMOJ4Y86Jw7XJWkoWHLmCjKgPfPi04EC4dYAKi0nBH6DKh/uObkZQsGRECoecSfeVHatolfVlF9gJ2xvcZIclVA3d2xdUqflsuGeXCru9TDd5ygDwD9TSpayJTQ4Awzdelq1Aezx7+GoCgc6K8KyMNpb+wiD0HQDUHz3Wj22qhu/AT1ojxUO4vaC0x8lGdGbNa5WOg0MUw+X1BUdSqYXxIBXTUn10ZFrZJb6b5zZpt5FB4FLsoSo9CAiQsZYMT/26EjoOjvol1ry6Or5Rula0CALF/KRfY/YZkse8ariAmTllxWFKbbT4Miwt43PcKXkgjNEwtWKHMv4stiJko23NDGuJ1yQnHcbzCRv0ChWmUSVn8HS/JFZMvCwGrUBlp4ZhDdFy5lrppv0g1ZTvyCo7S9l1ln5Jf+yOFjg6C73tqtROQWBGws9BdYW9ZZukiVy+f6a/Ytl14/1G7gM9ic="
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ;fi
addons:
coverity_scan:
project:
name: "did-g/OpenCPN"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "mkdir build_s && cd build_s && cmake -DCMAKE_BUILD_TYPE=Debug ../"
build_command: "make -sj2"
branch_pattern: integration