sudo: required
dist: bionic
language: c
install:
  - sudo apt-get install -y --force-yes gcc make cmake libglib2.0-dev
  - sudo apt-get install -y --force-yes autoconf automake libtool xutils-dev
  - sudo apt-get install -y --force-yes jq
env:
  matrix:
    - BUILD_TYPE=Debug
    - BUILD_TYPE=Release
before_script:
  - set -e
  - mkdir /tmp/oio
  - export CMAKE_OPTS='-DCMAKE_INSTALL_PREFIX=/tmp/ROOT'
  - cmake ${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
  - make all
  - make install
script:
  - set -e
  - export PATH="$PATH:/tmp/ROOT/bin" TMPDIR=/tmp
  - ./tools/gridinit-genconf.sh 15
  - gridinit -d -s gridinit /tmp/gridinit/gridinit.conf
  - ./tools/cycle.sh
  - pkill gridinit

sudo: required
dist: bionic
language: c
install:
  - sudo apt-get install -y --force-yes gcc make cmake libglib2.0-dev
  - sudo apt-get install -y --force-yes clang
  - sudo apt-get install -y --force-yes autoconf automake libtool xutils-dev
  - sudo apt-get install -y --force-yes jq
env:
  matrix:
    - BUILD_TYPE=Debug COMPILER=gcc
    - BUILD_TYPE=Release COMPILER=gcc
    - BUILD_TYPE=Debug COMPILER=clang
    - BUILD_TYPE=Release COMPILER=clang
before_script:
  - set -ex
  - mkdir /tmp/oio
  - export CMAKE_OPTS='-DCMAKE_INSTALL_PREFIX=/tmp/ROOT' CC=$COMPILER
  - cmake ${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
  - make all
  - make install
script:
  - set -e
  - export PATH="$PATH:/tmp/ROOT/bin" TMPDIR=/tmp
  - ./tools/gridinit-genconf.sh 15
  - gridinit -d -s gridinit /tmp/gridinit/gridinit.conf
  - ./tools/cycle.sh
  - pkill gridinit

Build with gcc and clang
ci: Build with gcc and clang
