Skip to content

Commit

Permalink
Travis: add testing of JSON output against schema and upgrade everyth…
Browse files Browse the repository at this point in the history
…ing to Python3
  • Loading branch information
rouault committed Jul 7, 2019
1 parent 076e62a commit d44e1e2
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
5 changes: 3 additions & 2 deletions travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
# "global" before_install script.

# Configure Python pip
pip install --user --upgrade pip
pip config --user set global.progress_bar off
pip3 install --user --upgrade pip
pip3 config --user set global.progress_bar off
pip3 install --user jsonschema
3 changes: 2 additions & 1 deletion travis/csa/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

set -e
sudo apt-get update -qq
sudo apt-get install -qq python3-pip

./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install -qq sqlite3 libsqlite3-dev

wget http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
Expand Down
6 changes: 6 additions & 0 deletions travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ fi
make check
make install
find /tmp/proj_autoconf_install_from_dist_all

/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o JSON -q > out.json
cat out.json
echo "Validating JSON"
jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/crsjson.schema.json && echo "Valid !"

cd ..

# cmake build from generated tarball
Expand Down
3 changes: 2 additions & 1 deletion travis/linux_clang/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

set -e
sudo apt-get update -qq
sudo apt-get install -qq python3-pip

./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install -qq sqlite3 libsqlite3-dev
7 changes: 4 additions & 3 deletions travis/linux_gcc/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

set -e
sudo apt-get update -qq
sudo apt-get install -qq python3-pip

./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install -y cppcheck
sudo apt-get install -qq lcov
sudo apt-get install -qq doxygen graphviz
Expand All @@ -14,7 +15,7 @@ sudo apt-get install -qq openjdk-7-jdk
scripts/cppcheck.sh
scripts/doxygen.sh

pip install --user sphinxcontrib-bibtex
pip install --user cpp-coveralls
pip3 install --user sphinxcontrib-bibtex
pip3 install --user cpp-coveralls

./travis/docker.sh
2 changes: 2 additions & 0 deletions travis/linux_gcc7/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

set -e
sudo apt-get update -qq
sudo apt-get install -qq python3-pip

./travis/before_install.sh

Expand Down
5 changes: 3 additions & 2 deletions travis/mingw32/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/bash

set -e
sudo apt-get update -qq
sudo apt-get install -qq python3-pip

./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install wget
sudo apt-get install binutils-mingw-w64-x86-64
sudo apt-get install gcc-mingw-w64-x86-64
sudo apt-get install g++-mingw-w64-x86-64
sudo apt-get install g++-mingw-w64
sudo apt-get install mingw-w64-tools
sudo apt-get install -y wine1.4-amd64
sudo apt-get install sqlite3
sudo apt-get install sqlite3
6 changes: 3 additions & 3 deletions travis/osx/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

export PATH=$HOME/Library/Python/3.6/bin:$PATH

./travis/before_install.sh

brew update
Expand All @@ -10,8 +12,6 @@ brew install sqlite3
brew install doxygen
brew install md5sha1sum

export PATH=$HOME/Library/Python/2.7/bin:$PATH
# breathe=4.12.0 is the last version to work for us with sphinx 1.8.5 / Python 2
pip install --user sphinx sphinx-rtd-theme sphinxcontrib-bibtex breathe==4.12.0
pip3 install --user sphinx sphinx-rtd-theme sphinxcontrib-bibtex breathe
which sphinx-build
(cd docs; make html)
2 changes: 2 additions & 0 deletions travis/osx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ set -e
export CCACHE_CPP2=yes
export PROJ_DB_CACHE_DIR="$HOME/.ccache"

export PATH=$HOME/Library/Python/3.6/bin:$PATH

CC="ccache clang" CXX="ccache clang++" CFLAGS="-Werror -O2" CXXFLAGS="-Werror -O2" ./travis/install.sh

0 comments on commit d44e1e2

Please sign in to comment.