Skip to content

Commit

Permalink
Merge pull request #398 from jongough/travis_and_appveyor_corrections
Browse files Browse the repository at this point in the history
Update Travis and Appveyor to build and create artifacts in git
  • Loading branch information
jongough authored Jun 27, 2019
2 parents 58f55a4 + 45bd7f9 commit 0efd190
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 59 deletions.
131 changes: 74 additions & 57 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,54 @@ matrix:
- os: osx
compiler: clang
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
- 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 libexpat1-dev libcairo2-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
- 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;
- 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
- if [ "${#OAUTH_ACCESS_TOKEN}" != 0 ];
then
(echo OAUTH_ACCESS_TOKEN=${OAUTH_ACCESS_TOKEN} > ~/.dropbox_uploader);
fi
- if [ "$CXX" = "g++" ];
then
export CXX="g++-6" CC="gcc-6";
fi
- if [ "${#OAUTH_ACCESS_TOKEN}" != 0 ];
then
(echo OAUTH_ACCESS_TOKEN=${OAUTH_ACCESS_TOKEN} > ~/.dropbox_uploader);
fi
addons:
apt:
sources:
Expand All @@ -60,24 +62,24 @@ addons:
- gcc-6
- g++-6
deploy:
matrix:
- provider: script
file: "$TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,pkg,txz,pkg.tar.xz}"
script: if [ -f ~/.dropbox_uploader ] ; then echo "OSX"; if [ "$TRAVIS_OS_NAME"
= "osx" ] ; then echo "upload pkg"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.pkg
/ ; fi; echo "Linux"; if [ "$TRAVIS_OS_NAME" = "linux" ] ; then echo "upload
rpm"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.rpm /; echo
"upload deb"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.deb
/; fi; fi
skip_cleanup: true
on: # Set Deploy conditions
# Deploy only when tag is not specified
tags: false
# or this branch
branch: master_1.5
# and only when API token is set
# condition: ""${#OAUTH_ACCESS_TOKEN} != 0 && $BUILD_TYPE = Release
condition: "${#OAUTH_ACCESS_TOKEN} != 0"
# - provider: script
# file: "$TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,pkg,txz,pkg.tar.xz}"
# script: if [ -f ~/.dropbox_uploader ] ; then echo "OSX"; if [ "$TRAVIS_OS_NAME"
# = "osx" ] ; then echo "upload pkg"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.pkg
# / ; fi; echo "Linux"; if [ "$TRAVIS_OS_NAME" = "linux" ] ; then echo "upload
# rpm"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.rpm /; echo
# "upload deb"; bash ../dropbox_uploader.sh upload $TRAVIS_BUILD_DIR/build/*.deb
# /; fi; fi
# skip_cleanup: true
# on: # Set Deploy conditions
# # Deploy only when tag is not specified
# tags: false
# # or this branch
# #branch: master_1.5
# all_branches: true
# # and only when API token is set
# # condition: ""${#OAUTH_ACCESS_TOKEN} != 0 && $BUILD_TYPE = Release
# condition: "${#OAUTH_ACCESS_TOKEN} != 0"
- provider: launchpad
slug: "~jonsgough/opencpn-plugin-draw/+git/ocpn_draw_pi"
oauth_token_secret:
Expand All @@ -89,10 +91,25 @@ deploy:
# Deploy only when tag is not specified
# tags: false
# or this branch
#branches:
# only:
# - master
branches:
only:
- master
# - master_1.5
all_branches: true
tags: true
#all_branches: true
condition: "$TRAVIS_OS_NAME = linux"
repo: jongough/ocpn_draw_pi

- provider: releases
api_key:
secure: "DBA400C8Pvswp0Dsb5aok/iZIw33M1GRzxXrER8fGwh7xw3TRl2/SIkoJNftC2fR4elce7Kom45duBRhrRsfeSjBKBvK/0IscUI+QIMH+OaxGIjxE+ahhpmXlUOdnKc9nkYS5RpPyOPHGU9nzd8A7aA86/KS2qoQmJ1Kcoewb9NJJAVjDvQYGaSzDXvlbqgvn05PFQ5xH6nFoda1Uz3759LovU6vpF0m7OLBCBSfJfOVyktyiqOpbjIAPLUhXDwBTQpGR3/2DFJ232uNNDfkMfCS6hyGvGnkmW+HQdolHnETcySr2R4p7B7CJdX7JJO+pM0v9e53xY2d/FdXa0JniBo0xDYnx5ND2uOMhK663C1Lwp/d307GuPW+hpjRdLnkLuQlTq7pYkwJlc7QSJY0HUSbRUOMtFpCXFMoyOo4iir8Sg0/BPljfQmcrmXiugmHDBrAk8HbhDgRs18Ptsw+YOXiCTbRTl8uJUOZHXh6d7XvgxrxovxG9+fi5VlchCI1TVHEO1cqJY7IsPhNmCC/Z+UecoF2DLDBB4IqPfPytTCVBBzSFXdGKcCdW103jcSx5awHTSkGvOm6aCQOyA/6cmiBSbOpnQ4rgpy6YcQg/gOpMvpPYqanDJCBAIZwc5Z1C1ybGanB5bhqyZmUyS317nvGBVes4PwXR4gHzAH+gKM="
file_glob: true
file: "$TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,txz,pkg,pkg.tar.xz}"
skip_cleanup: true
on:
tags: true
all_branches: true


#environment:
# OAUTH_ACCESS_TOKEN:
# secure: OIqJeLohefVWvPklh+LxxIZdzVCXU4T++cJqkbaQUiT1HDWvleojgGNARPMG3STP
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ SET(CPACK_PACKAGE_CONTACT "Jon Gough")

SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "6")
SET(VERSION_PATCH "0")
SET(VERSION_DATE "24/06/2019")
SET(VERSION_PATCH "1")
SET(VERSION_DATE "27/06/2019")
SET(OCPN_MIN_VERSION "ov50")
SET(OD_COMMENT " * Initial release for O5 using CI")
SET(OCPN_API_VERSION_MAJOR "1")
Expand Down
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ deploy:
on:
appveyor_repo_tag: true # deploy on tag push only
configuration: Release # Debug contains non-redist MS DLLs

environment:
GitHub_auth_token:
secure: OIqJeLohefVWvPklh+LxxIZdzVCXU4T++cJqkbaQUiT1HDWvleojgGNARPMG3STP

0 comments on commit 0efd190

Please sign in to comment.