-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now, only tries to compile and run a simple `pscoast`. Adds build scripts in the `ci` folder and the configuration for Travis on `.travis.yml`. The scripts download GSHHG and DCW as well.
- Loading branch information
Showing
3 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
language: c | ||
|
||
sudo: required | ||
|
||
branches: | ||
only: | ||
- master | ||
- 5.4 | ||
# Regex to build tagged commits with version numbers | ||
- /\d+\.\d+(\.\d+)?(\S*)?$/ | ||
|
||
os: | ||
- linux | ||
#- osx | ||
|
||
env: | ||
global: | ||
- INSTALLDIR="$HOME/gmt-install-dir" | ||
- COASTLINEDIR="$HOME/gmt-install-dir/coast" | ||
- PATH="$INSTALLDIR/bin:$PATH" | ||
- LD_LIBRARY_PATH="$INSTALLDIR/lib:$LD_LIBRARY_PATH" | ||
|
||
before_install: | ||
# Install GMT dependencies | ||
- bash ci/travis-setup.sh | ||
|
||
install: | ||
# Build and install GMT | ||
- bash ci/travis-build.sh; | ||
|
||
script: | ||
- gmt defaults -Vd | ||
- gmt pscoast -R0/10/0/10 -JM6i -Ba -Ggray -P -Vd > test.ps | ||
|
||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# Build and install GMT | ||
|
||
# To return a failure if any commands inside fail | ||
set -e | ||
|
||
mkdir build && cd build | ||
|
||
cmake -D CMAKE_INSTALL_PREFIX=$INSTALLDIR \ | ||
-D GMT_LIBDIR=$INSTALLDIR/lib \ | ||
-D DCW_ROOT=$COASTLINEDIR \ | ||
-D GSHHG_ROOT=$COASTLINEDIR \ | ||
.. | ||
|
||
make -j | ||
make check | ||
make install | ||
|
||
# Turn off exit on failure. | ||
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# Setup TravisCI to be able to build and test GMT | ||
|
||
# To return a failure if any commands inside fail | ||
set -e | ||
|
||
# Install dependencies | ||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake libcurl4-gnutls-dev libnetcdf-dev \ | ||
libgdal1-dev libfftw3-dev libpcre3-dev liblapack-dev ghostscript curl | ||
else | ||
echo "OSX not supported yet"; | ||
fi | ||
|
||
# Get the coastlines and country polygons | ||
EXT="tar.gz" | ||
GSHHG="gshhg-gmt-2.3.7" | ||
DCW="dcw-gmt-1.1.4" | ||
|
||
mkdir $INSTALLDIR | ||
mkdir $COASTLINEDIR | ||
|
||
# GSHHG (coastlines, rivers, and political boundaries): | ||
echo "" | ||
echo "Downloading and unpacking GSHHG" | ||
echo "================================================================================" | ||
curl "http:https://www.soest.hawaii.edu/pwessel/gshhg/$GSHHG.$EXT" > $GSHHG.$EXT | ||
tar xzf $GSHHG.$EXT | ||
cp $GSHHG/* $COASTLINEDIR/ | ||
|
||
# DCW (country polygons): | ||
echo "" | ||
echo "Downloading and unpacking DCW" | ||
echo "================================================================================" | ||
curl "http:https://www.soest.hawaii.edu/pwessel/dcw/$DCW.$EXT" > $DCW.$EXT | ||
tar xzf $DCW.$EXT | ||
cp $DCW/* $COASTLINEDIR | ||
|
||
ls $COASTLINEDIR | ||
|
||
# Turn off exit on failure. | ||
set +e |