Skip to content

Commit

Permalink
CI environment: adapt for C++11 capable environments
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 29, 2018
1 parent 2290f64 commit 472ed39
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 30 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,42 @@ matrix:
include:

- os: linux
dist: trusty
compiler: gcc
language: c
language: cpp
sudo: required
services:
- docker
env:
- BUILD_NAME=linux_gcc
- DETAILS="linux, gcc"
- os: linux
dist: trusty
compiler: clang
language: c
language: cpp
sudo: required
services:
- docker
env:
- BUILD_NAME=linux_clang
- DETAILS="linux, clang"
- os: osx
language: c
language: cpp
env:
- BUILD_NAME=osx
- DETAILS="osx"
- os: linux
dist: trusty
compiler: gcc
language: c
language: cpp
sudo: required
env:
- BUILD_NAME=mingw32
- DETAILS="mingw32"

- os: linux
compiler: gcc
language: c
language: cpp
dist: trusty
env:
- BUILD_NAME=csa
Expand Down
17 changes: 0 additions & 17 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ platform:
environment:
matrix:

# Does not work
# VS 2008
# - BUILD_TYPE: cmake
# VS_VERSION: Visual Studio 9 2008

# VS 2010
- BUILD_TYPE: cmake
VS_VERSION: Visual Studio 10

# VS 2012
- BUILD_TYPE: cmake
VS_VERSION: Visual Studio 11

# VS 2013
- BUILD_TYPE: cmake
VS_VERSION: Visual Studio 12

# VS 2015
- BUILD_TYPE: cmake
VS_VERSION: Visual Studio 14
Expand Down
2 changes: 1 addition & 1 deletion travis/csa/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
# prepare build files
./autogen.sh

./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v ./configure
CXXFLAGS="-std=c++11" ./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v ./configure
./clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/scan-build -o scanbuildoutput -plist -v make -j3

if grep -r "\.c" scanbuildoutput | grep "<string>" | grep -v "<key>"; then echo "error" && /bin/false; else echo "ok"; fi
2 changes: 1 addition & 1 deletion travis/linux_clang/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

export CCACHE_CPP2=yes

CC="ccache clang" CFLAGS="-std=c89 -Werror -fsanitize=address" ./travis/install.sh
CC="ccache clang" CXX="ccache clang++" CFLAGS="-std=c89 -Werror -fsanitize=address" CXXFLAGS="-Werror -fsanitize=address" ./travis/install.sh
1 change: 1 addition & 0 deletions travis/linux_gcc/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install -y cppcheck

set -e
Expand Down
2 changes: 1 addition & 1 deletion travis/linux_gcc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

export CCACHE_CPP2=yes

CC="ccache gcc" CFLAGS="-std=c89 -Werror" ./travis/install.sh
CC="ccache gcc" CXX="ccache g++" CFLAGS="-std=c89 -Werror" CXXFLAGS="-Werror" ./travis/install.sh
8 changes: 6 additions & 2 deletions travis/mingw32/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ set -e
./travis/before_install.sh

sudo apt-get update -qq
sudo apt-get install -qq wine
sudo apt-get install -qq mingw32
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
4 changes: 2 additions & 2 deletions travis/mingw32/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export CCACHE_CPP2=yes
# autoconf build
mkdir build_autoconf
cd build_autoconf
CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install
CC="ccache x86_64-w64-mingw32-gcc" CXX="ccache x86_64-w64-mingw32-g++" LD=x86_64-w64-mingw32-ld ../configure --host=x86_64-w64-mingw32 --prefix=/tmp/proj_autoconf_install
make -j3
make install
make dist-all
Expand All @@ -24,7 +24,7 @@ cd ..
# autoconf build with grids
mkdir build_autoconf_nad
cd build_autoconf_nad
CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install_nad
CC="ccache x86_64-w64-mingw32-gcc" CXX="ccache x86_64-w64-mingw32-g++" LD=x86_64-w64-mingw32-ld ../configure --host=x86_64-w64-mingw32 --prefix=/tmp/proj_autoconf_install_nad
make -j3
make install
find /tmp/proj_autoconf_install_nad
Expand Down
2 changes: 1 addition & 1 deletion travis/osx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

export CCACHE_CPP2=yes

CC="ccache clang" CFLAGS="-std=c89 -g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -O2" ./travis/install.sh
CC="ccache clang" CXX="ccache clang++" CFLAGS="-Werror -O2" CXXFLAGS="-Werror -O2" ./travis/install.sh

0 comments on commit 472ed39

Please sign in to comment.