language: c

matrix:

  exclude:
    - compiler: gcc

  include:



    - os: linux
      dist: bionic
      name: "Ubuntu-18.04LTS light w/ImageMagick"
      env:
        - MAGIC_BIN="/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.7/bin-q16/Magick-config"
      script:
        - ./bootstrap.sh
        - ./configure CPPFLAGS="-I/usr/include/geotiff"
        - make
        - sudo make install
        - cd Davis
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
        - cd ../LaCrosse
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
      addons:
        apt:
          packages:
            - imagemagick
            - libmagickcore-dev
            - libmotif-dev
            - libcurl4-openssl-dev
            - libpcre3-dev
            - libdb5.3-dev
            - shapelib
            - libshp-dev
            - libxpm-dev


    - os: linux
      dist: focal
      name: "Ubuntu-20.04LTS gcc full-featured w/GraphicsMagick"
      env:
         - CFLAGS="${CFLAGS} -Wall -O2 -Wformat-truncation=2 -Wstringop-truncation -Wextra"
      before_script:
        - export CC="gcc"
        - echo ${CC}
        - ${CC} --version
      script:
        - ./bootstrap.sh
        - ./configure CPPFLAGS="-I/usr/include/geotiff"
        - make
        - sudo make install
        - cd Davis
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
        - cd ../LaCrosse
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
      addons:
        apt:
          packages:
            - graphicsmagick
            - libmotif-dev
            - libcurl4-openssl-dev
            - libpcre3-dev
            - libproj-dev
            - libdb5.3-dev
            - libax25-dev
            - shapelib
            - libshp-dev
            - festival
            - festival-dev
            - libgeotiff-dev
            - libgraphicsmagick1-dev
            - gpsman
            - gpsmanshp
            - libwebp-dev
            - libxpm-dev

    - os: linux
      dist: bionic
      name: "Ubuntu-18.04LTS gcc-9 full-featured w/GraphicsMagick"
      env:
         - CFLAGS="${CFLAGS} -Wall -O2 -Wformat-truncation=2 -Wstringop-truncation -Wextra"
      before_install:
        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
        - sudo apt-get update -q
        - sudo apt-get install gcc-9 -y
      before_script:
        - export CC="gcc-9"
        - echo ${CC}
        - ${CC} --version
      script:
        - ./bootstrap.sh
        - ./configure CPPFLAGS="-I/usr/include/geotiff"
        - make
        - sudo make install
        - cd Davis
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
        - cd ../LaCrosse
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
      addons:
        apt:
          sources:
            - llvm-toolchain-xenial-7
            - ubuntu-toolchain-r-test
          packages:
#            - gcc-9
            - graphicsmagick
            - libmotif-dev
            - libcurl4-openssl-dev
            - libpcre3-dev
            - libproj-dev
            - libdb5.3-dev
            - libax25-dev
            - shapelib
            - libshp-dev
            - festival
            - festival-dev
            - libgeotiff-dev
            - libgraphicsmagick1-dev
            - gpsman
            - gpsmanshp
            - libwebp-dev
            - libxpm-dev

    - os: osx
      name: "OSX semi-light w/GraphicsMagick"
      osx_image: xcode12.2
      script:
        - ./bootstrap.sh
        - ./configure CPPFLAGS="-I/usr/include/geotiff"
        - make
        - sudo make install
#        - cd Davis
#        - ./bootstrap.sh
#        - LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure
#        - make
#        - sudo make install
#        - cd ../LaCrosse
#        - ./bootstrap.sh
#        - LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure
#        - make
#        - sudo make install
      addons:
        homebrew:
          packages:
            - berkeley-db
            - graphicsmagick
            - libgeotiff
            - openmotif
            - pcre
            - proj
            - shapelib
            - wget
#            - mysql
#          update: true



    - os: linux
      dist: xenial
      name: "Ubuntu-16.04LTS Exercise Configure Options"
      env:
        - MAGIC_BIN="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config"
      script:
        - ./bootstrap.sh

#        - ./configure --without-festival CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install

#        - ./configure --without-gpsman CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install

#        - ./configure --without-libcurl CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install

#        - ./configure --without-libproj CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
#        - ./configure --without-shapelib CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
#        - ./configure --without-geotiff CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
#        - ./configure --without-ax25 CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
#        - ./configure --without-map-cache CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
        - ./configure --without-graphicsmagick CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
        - make
#        - sudo make install
 
        - ./configure --without-graphicsmagick --without-imagemagick CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
        - make
#        - sudo make install

        - ./configure --without-shapelib --without-graphicsmagick --without-imagemagick CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
        - make
#        - sudo make install

        - ./configure --without-imagemagick --without-graphicsmagick --without-shapelib --without-map-cache --without-libcurl --without-ax25 --without-libproj --without-geotiff --without-festival --without-gpsman CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
        - make
#        - sudo make install

#        - ./configure --with-errorpopups CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install
 
        - ./configure --with-libgc CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
        - make
#        - sudo make install

#        - ./configure --with-profiling CPPFLAGS="-I/usr/include/geotiff"
#        - make clean
#        - make
#        - sudo make install

##        - ./configure --with-lsb CPPFLAGS="-I/usr/include/geotiff"
##        - make clean
##        - make
##        - sudo make install

##        - ./configure --with-postgis CPPFLAGS="-I/usr/include/geotiff"
##        - make clean
##        - make
##        - sudo make install

##        - ./configure --with-mysql CPPFLAGS="-I/usr/include/geotiff"
##        - make clean
##        - make
##        - sudo make install
        - cd Davis
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
        - cd ../LaCrosse
        - ./bootstrap.sh
        - ./configure
        - make
        - sudo make install
      addons:
        apt:
          packages:
            - imagemagick
            - libmagickcore-dev
            - graphicsmagick
            - libmotif-dev
            - libcurl4-openssl-dev
            - libpcre3-dev
            - libproj-dev
            - libdb5.3-dev
            - libax25-dev
            - shapelib
            - libshp-dev
            - festival
            - festival-dev
            - libgeotiff-dev
            - libgraphicsmagick1-dev
            - gpsman
            - gpsmanshp
            - libwebp-dev
            - libgc-dev
            - libxpm-dev


