# Build on Ubuntu 18.04
dist: bionic

# Specify language
language: cpp

# Build with both clang and gcc
compiler:
  - clang
  - g++

# Build all branches except gh-pages
branches:
  except:
    - gh-pages

# Install dependencies
before_install:
  - sudo apt-get update
  - sudo apt-get install -y --install-recommends docutils-common libelfin-dev nodejs npm

# Make and install
install:
  - make
  - sudo make install

# Run the make check target (add tests later)
script:
  - make check USE_SYSTEM_COZ=1

# Test the Rust support as well
matrix:
  include:
    - language: rust
      rust: stable
      before_install: true
      install: true
      script: cargo test --manifest-path rust/Cargo.toml

