Skip to content

Commit 3bd5b1c

Browse files
committed
Merge pull request #130 from zbeekman/issue-119-travis-container-build
Issue 119 travis container build
2 parents 60cd19c + 7538325 commit 3bd5b1c

File tree

4 files changed

+58
-164
lines changed

4 files changed

+58
-164
lines changed

.travis.yml

Lines changed: 43 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,30 @@ language: python
33
python:
44
- 2.7
55

6+
sudo: false
7+
8+
cache:
9+
apt: true
10+
pip: true
11+
directories:
12+
- $HOME/.cache/pip
13+
- $HOME/.local
14+
15+
addons:
16+
apt:
17+
sources:
18+
- kalakris-cmake
19+
- ubuntu-toolchain-r-test
20+
packages:
21+
- gfortran-4.9
22+
- gfortran-5
23+
- binutils
24+
- cmake
25+
- python-pip
26+
627
# Build matrix: Run the three build systems and tests in parallel
728
env:
829
global:
9-
- DEPENDS="gfortran-4.9"
1030
- CHECK_README_PROGS="yes"
1131
matrix:
1232
# CMake build with unit tests, no documentation, with coverage analysis
@@ -17,72 +37,40 @@ env:
1737
cd cmake-build &&
1838
cmake -DCMAKE_BUILD_TYPE=COVERAGE .. &&
1939
make -j 4 check"
20-
SPECIFIC_DEPENDS="cmake nodejs"
21-
JLINT="yes"
22-
DOCS="yes"
23-
FoBiS="no"
2440
CODE_COVERAGE="yes"
2541
2642
# build with build.sh, make documentation, run unit tests and perform coverage analysis
2743
- BUILD_SCRIPT="./build.sh --coverage --enable-unicode"
28-
SPECIFIC_DEPENDS="binutils"
29-
JLINT="no"
30-
DOCS="yes"
31-
FoBiS="yes"
3244
CODE_COVERAGE="yes"
3345

34-
# test scons build, no documentation or jsonlint, run unit tests
35-
- BUILD_SCRIPT="scons && scons test"
36-
SPECIFIC_DEPENDS=""
37-
JLINT="no"
38-
DOCS="no"
39-
FoBiS="no"
40-
41-
before_install:
42-
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
43-
- |
44-
if [[ $SPECIFIC_DEPENDS == *cmake* ]]; then
45-
sudo apt-add-repository -y ppa:kalakris/cmake
46-
fi
47-
- sudo apt-get update -qq
48-
- |
49-
if [[ $JLINT == [yY]* ]]; then
50-
curl -sL https://deb.nodesource.com/setup | sudo bash -x -
51-
fi
52-
- |
53-
if [[ $CHECK_README_PROGS == [yY]* ]]; then
54-
wget http://people.sc.fsu.edu/~jburkardt/f_src/f90split/f90split.f90
55-
fi
56-
- |
57-
if [[ $DOCS == [yY]* ]]; then
58-
export DEPENDS="$DEPENDS exuberant-ctags"
59-
fi
60-
- ulimit -s unlimited
61-
6246
install:
63-
- sudo apt-get install -y $SPECIFIC_DEPENDS $DEPENDS
64-
- |
65-
if [[ $JLINT == [yY]* ]]; then
66-
sudo npm install -g jsonlint
67-
fi
68-
- sudo ln -fs /usr/bin/gfortran-4.9 /usr/bin/gfortran && gfortran --version
69-
- sudo ln -fs /usr/bin/gcov-4.9 /usr/bin/gcov && gcov --version
7047
- |
71-
if [[ $FoBiS == [yY]* ]]; then
72-
sudo -H pip install FoBiS.py && FoBiS.py --version
48+
if [[ ! -d "$HOME/.local/bin" ]]; then
49+
mkdir "$HOME/.local/bin"
7350
fi
51+
- export PATH="$HOME/.local/bin:$PATH"
52+
- export FC=/usr/bin/gfortran-4.9
53+
- ln -fs /usr/bin/gfortran-4.9 "$HOME/.local/bin/gfortran" && gfortran --version
54+
- ls -l /usr/bin/gfortran-4.9
55+
- ln -fs /usr/bin/gcov-4.9 "$HOME/.local/bin/gcov" && gcov --version
7456
- |
75-
if [[ $DOCS == [yY]* ]]; then
76-
sudo -H pip install ford && ford --version
57+
if ! which f90split; then
58+
wget http://people.sc.fsu.edu/~jburkardt/f_src/f90split/f90split.f90 && \
59+
gfortran -o f90split f90split.f90 && \
60+
mv f90split "$HOME/.local/bin/" && \
61+
rm f90split.f90
7762
fi
63+
- which FoBiS.py || (pip install FoBiS.py && FoBiS.py --version)
64+
- which ford || (pip install ford && ford --version)
65+
- which jsonlint || (pip install git+https://github.com/dmeranda/demjson.git && jsonlint --version)
66+
67+
before_script:
7868
- |
7969
if [[ $CHECK_README_PROGS == [yY]* ]]; then
80-
gfortran -o f90split f90split.f90 && \
81-
./f90split README.md && \
70+
f90split README.md && \
8271
for f in example*.md; do
8372
mv $f src/tests/jf_test_${f%.md}.f90
8473
done
85-
rm f90split.f90 f90split
8674
fi
8775
8876
script:
@@ -91,7 +79,10 @@ script:
9179

9280
after_success:
9381
- cd $TRAVIS_BUILD_DIR
94-
- if [[ $CODE_COVERAGE == [yY]* ]]; then bash <(curl -s https://codecov.io/bash) ; fi
82+
- |
83+
if [[ $CODE_COVERAGE == [yY]* ]]; then
84+
bash <(curl -s https://codecov.io/bash)
85+
fi
9586
- git config --global user.name "TRAVIS-CI-for-$(git --no-pager show -s --format='%cn' $TRAVIS_COMMIT)"
9687
- git config --global user.email "$(git --no-pager show -s --format='%ce' $TRAVIS_COMMIT)"
9788
#broken for now# - ./deploy.sh #handles updating documentation for master branch as well as tags

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
[Full Changelog](https://github.com/jacobwilliams/json-fortran/compare/4.1.1...HEAD)
1818

1919
**Enhancements**
20+
- Removed official SCons support to facilitate faster development
21+
cycle,
22+
[\#121](https://github.com/jacobwilliams/json-fortran/issues/121)
23+
via
24+
[PR \#130](https://github.com/jacobwilliams/json-fortran/pull/130)
25+
from [zbeekman](https://github.com/zbeekman)
2026
- Add a
2127
[CHANGELOG](https://github.com/jacobwilliams/json-fortran/blob/master/CHANGELOG.md)
2228
[\#120](https://github.com/jacobwilliams/json-fortran/issues/120)
@@ -63,6 +69,10 @@
6369
- Documentation fixes & coverage improvements
6470
[\#112](https://github.com/jacobwilliams/json-fortran/pull/112)
6571
([zbeekman](https://github.com/zbeekman))
72+
- Speedier container based
73+
[Travis-CI](https://travis-ci.org/jacobwilliams/json-fortran) builds
74+
[\#130](https://github.com/jacobwilliams/json-fortran/pull/130)
75+
([zbeekman](https://github.com/zbeekman))
6676

6777

6878
## [4.1.1](https://github.com/jacobwilliams/json-fortran/tree/4.1.1) (2015-05-27)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ Currently, several ways are provided to build the jsonfortran library
9595

9696
* A [Visual Studio](http://www.visualstudio.com) project is included for building the library (and unit tests) on Windows with the Intel Fortran Compiler. The project has been tested with Visual Studio 2010 and 2013.
9797

98-
* A [SCons](http://www.scons.org) `SConstruct` file. The library and unit tests are built by typing `scons` and tested by typing `scons test`. The library may be optionally installed by `scons install` or `sudo scons install`.
99-
10098
* A [CMake](http://www.cmake.org) build
10199
system is provided. This build system has been tested on Mac and Linux
102100
using the Intel Fortran Compiler, gfortran 4.9, and NAG Fortran 6.0. It has not been
@@ -291,7 +289,11 @@ The code above produces the file:
291289
Documentation
292290
--------------
293291

294-
The API documentation for the latest release version can be found [here](http://jacobwilliams.github.io/json-fortran). The documentation can also be generated by processing the source files with [FORD](https://github.com/cmacmackin/ford). Note that both the shell script, CMake, and SCons will also generate these files automatically in the documentation folder, assuming you have FORD installed.
292+
The API documentation for the latest release version can be found
293+
[here](http://jacobwilliams.github.io/json-fortran). The
294+
documentation can also be generated by processing the source files
295+
with [FORD](https://github.com/cmacmackin/ford). Note that both the
296+
shell script and CMake will also generate these files automatically in the documentation folder, assuming you have FORD installed.
295297

296298
[top](#json-fortran)
297299

SConstruct

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)