Skip to content

Commit

Permalink
Merge of simplify_build feature branch, which enables setuptools to b…
Browse files Browse the repository at this point in the history
…uild all dependencies, relaxes enforcement of flat namespace library, move local Docker container testing online, and exposes diverse range of tests now online, package name fixes, eliminates initial data downloads, Scientific fixes for Trusty available on Travis and various other Travis fixes.
  • Loading branch information
adamcandy committed Apr 20, 2017
1 parent c3eca83 commit 98ddc4a
Show file tree
Hide file tree
Showing 12 changed files with 489 additions and 58 deletions.
245 changes: 200 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,200 @@
language: python
python:
- "2.7"
sudo: required
#install: "pip install -r requirements.txt"
#before_install:
# - sudo apt-get -qq update
# - sudo apt-get install -y -qq python-numpy python-scientific python-matplotlib
addons:
apt:
packages:
- python-numpy
- python-scientific
- python-matplotlib
- gcc
- g++
- gfortran
- tree
virtualenv:
system_site_packages: true
install:
- pip install numpy matplotlib pyproj Pydap shapely Pillow
before_script:
- sudo apt-get install -qq python-numpy python-scientific python-matplotlib gmsh
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/:$HOME/build/shingleproject/Shingle/lib/spud/:$HOME/build/shingleproject/Shingle/spud/.libs/:$HOME/build/lib.linux-x86_64-2.7/"
- export LIBRARY_PATH="$LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/:$HOME/build/shingleproject/Shingle/spud/:$HOME/build/shingleproject/Shingle/spud/.libs/:$HOME/build/lib.linux-x86_64-2.7/"
# - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/"
# - export LIBRARY_PATH="$LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/"
script:
- pip install numpy matplotlib pyproj Pydap shapely Pillow pytest
- python -c 'import Scientific.IO'
- ./configure
- make
- make installpackage
- make unittest
- make test
#before_script:
# - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/"
# - export LIBRARY_PATH="$LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/"
# - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/:$HOME/build/shingleproject/Shingle/lib/spud/:$HOME/build/shingleproject/Shingle/spud/.libs/:$HOME/build/lib.linux-x86_64-2.7/"
# - export LIBRARY_PATH="$LIBRARY_PATH:$HOME/build/shingleproject/Shingle/lib/:$HOME/build/shingleproject/Shingle/spud/:$HOME/build/shingleproject/Shingle/spud/.libs/:$HOME/build/lib.linux-x86_64-2.7/"
#script:
# - ./configure
# - make
# - find . -iname libspud* -print -exec nm -g {} \;

matrix:
include:

# Ubuntu Trusty 14.04 Docker container build and test
- env:
- NAME=trusty-docker
services:
- docker
dist: trusty
language: cpp
install:
- docker build -t shingle .
script:
- docker run -a stdout -t shingle make unittest
- docker run -v $PWD:/run -w="/run" -a stdout -t shingle shingle -t

# Ubuntu Precise 12.04 Docker container build and test
- env:
- NAME=precise-docker
services:
- docker
dist: trusty
language: cpp
install:
- docker build -f Dockerfile_precise -t shingle .
script:
- docker run -a stdout -t shingle make unittest
- docker run -v $PWD:/run -w="/run" -a stdout -t shingle shingle -t

# Ubuntu Xenial 16.04 Docker container build and test
- env:
- NAME=xenial-docker
services:
- docker
dist: trusty
language: cpp
install:
- docker build -f Dockerfile_xenial -t shingle .
script:
- docker run -a stdout -t shingle make unittest
- docker run -v $PWD:/run -w="/run" -a stdout -t shingle shingle -t

# Ubuntu Trusty 14.04 Travis apt base packages build and test
- env:
- NAME=trusty-apt
dist: trusty
language: python
python: 2.7
sudo: required
compiler: gcc
addons:
apt:
packages:
# - git
# - gcc
# - g++
- build-essential
- python-setuptools
- python-dev
- python-pip
- python-scipy
- python-numpy
- python-netcdf
- python-scientific
- python-matplotlib
- python-shapely
- python-pyproj
- python-pil
- gmsh
- python-pytest
- curl
virtualenv:
system_site_packages: true
install:
# Temporarily update all apt packages
- sudo apt-get update
- sudo apt-get install -y git gcc g++ build-essential python-setuptools python-dev python-pip python-scipy python-numpy python-netcdf python-scientific python-matplotlib python-shapely python-pyproj python-pil gmsh python-pytest
- pip install Pydap
before_script:
- export LD_LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LIBRARY_PATH"
- export LD_LIBRARY_PATH="/usr/lib/python2.7/dist-packages/Scientific/:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="/usr/lib/python2.7/dist-packages/Scientific/:$LIBRARY_PATH"
- export PYTHONPATH="/usr/lib/python2.7/dist-packages/Scientific/:$PYTHONPATH"
script:
- make
- make unittest
# Pre-download, to best work with Travis timeout
- curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc
- make test

# Ubuntu Precise 12.04 Travis apt base packages build and test
- env:
- NAME=precise-apt
dist: precise
language: python
python: 2.7
sudo: required
compiler: gcc
addons:
apt:
packages:
# - git
# - gcc
# - g++
- build-essential
- python-setuptools
- python-dev
- python-pip
- python-scipy
- python-numpy
- python-scientific
- python-matplotlib
- python-shapely
- python-pyproj
- python-imaging
- gmsh
- python-py
- curl
virtualenv:
system_site_packages: true
install:
# Temporarily update all apt packages
- sudo apt-get update
- sudo apt-get install -y git gcc g++ build-essential python-setuptools python-dev python-pip python-scipy python-numpy python-scientific python-matplotlib python-shapely python-pyproj python-imaging gmsh python-py
- pip install Pydap
before_script:
- export LD_LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LIBRARY_PATH"
script:
- make
- make unittest
# Pre-download, to best work with Travis timeout
- curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc
- make test

# Ubuntu Trusty 14.04 Travis pip base packages build and test
- env:
- NAME=trusty-pip
dist: trusty
language: python
python: 2.7
# Temporarily roll back to Precise
sudo: required
compiler: gcc
addons:
apt:
packages:
# Temporarily install apt Scientific
- python-netcdf
- python-scientific
- gmsh
- curl
virtualenv:
system_site_packages: true
install:
- pip install numpy matplotlib pyproj Pydap shapely Pillow pytest
#- pip install ScientificPython
before_script:
- export LD_LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LIBRARY_PATH"
script:
- make
- make unittest
# Pre-download, to best work with Travis timeout
- curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc
- make test

# Ubuntu Precise 12.04 Travis pip base packages build and test
- env:
- NAME=precise-pip
dist: precise
language: python
python: 2.7
# Temporarily roll back to Precise
sudo: required
compiler: gcc
addons:
apt:
packages:
# Temporarily install apt Scientific
- python-scientific
- gmsh
- curl
virtualenv:
system_site_packages: true
install:
- pip install numpy matplotlib pyproj Pydap shapely Pillow pytest
#- pip install ScientificPython
before_script:
- export LD_LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="$HOME/build/shingleproject/Shingle/lib/:$LIBRARY_PATH"
script:
- make
- make unittest
# Pre-download, to best work with Travis timeout
- curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc
- make test

69 changes: 69 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# DockerFile for a Shingle development container

# Use a Trusty base image
FROM ubuntu:trusty

# This DockerFile is looked after by
MAINTAINER Adam Candy <[email protected]>

# Install required packages
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
build-essential \
python-setuptools \
python-dev \
python-pip \
python-scipy \
python-numpy \
python-scientific \
python-matplotlib \
python-shapely \
python-pyproj \
python-pil \
gmsh \
python-pytest \
curl

RUN pip install Pydap

# Set build compiler environment
ENV CC=gcc

# Report Python version
#RUN python --version

# Add a user
RUN adduser --disabled-password --gecos "" shingle
USER shingle
WORKDIR /home/shingle

# Make a copy of the project Shingle
RUN git clone https://github.com/adamcandy/Shingle.git
WORKDIR /home/shingle/Shingle

RUN git checkout simplify_build

#ARG SHINGLE_URL=unknown
RUN git pull

ENV PATH /home/shingle/Shingle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

#RUN ./configure

#RUN pip install numpy matplotlib pyproj Pydap shapely Pillow

# Pre-download, to best work with Travis timeout
RUN curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc

RUN make
#RUN make unittest

#WORKDIR /home/shingle/Shingle/shingle/unittest
#RUN py.test

#RUN python -vc 'import shapely.geometry' 1>&2 | grep shapely

#RUN make test

69 changes: 69 additions & 0 deletions Dockerfile_precise
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# DockerFile for a Shingle development container

# Use a Trusty base image
FROM ubuntu:trusty

# This DockerFile is looked after by
MAINTAINER Adam Candy <[email protected]>

# Install required packages
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
build-essential \
python-setuptools \
python-dev \
python-pip \
python-scipy \
python-numpy \
python-scientific \
python-matplotlib \
python-shapely \
python-pyproj \
python-pil \
gmsh \
python-pytest \
curl

RUN pip install Pydap

# Set build compiler environment
ENV CC=gcc

# Report Python version
#RUN python --version

# Add a user
RUN adduser --disabled-password --gecos "" shingle
USER shingle
WORKDIR /home/shingle

# Make a copy of the project Shingle
RUN git clone https://github.com/adamcandy/Shingle.git
WORKDIR /home/shingle/Shingle

RUN git checkout simplify_build

#ARG SHINGLE_URL=unknown
RUN git pull

ENV PATH /home/shingle/Shingle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

#RUN ./configure

#RUN pip install numpy matplotlib pyproj Pydap shapely Pillow

# Pre-download, to best work with Travis timeout
RUN curl http://store.pangaea.de/Publications/TimmermannR_et_al_2010/RTopo105b_50S.nc -o test/Amundsen_Sea/data/RTopo.nc

RUN make
#RUN make unittest

#WORKDIR /home/shingle/Shingle/shingle/unittest
#RUN py.test

#RUN python -vc 'import shapely.geometry' 1>&2 | grep shapely

#RUN make test

Loading

0 comments on commit 98ddc4a

Please sign in to comment.