
dist: xenial
language: cpp
compiler: gcc
sudo: false
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
script: ./autogen.sh && ./configure LDFLAGS="-static-libstdc++ -static-libgcc" && make distcheck -j3
after_script: test -e lnav-*/_build/sub/test/test-suite.log  && cat lnav-*/_build/sub/test/test-suite.log

env:
  global:
   - LDFLAGS: -static-libstdc++ -static-libgcc
   # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
   #   via the "travis encrypt" command using the project repo's public key
   - secure: "P3wQLswiGYWrZwO4bxFmsA4XG5s/pS+renL0RMeotMTQwQQXmy1ZCvwMnAgaYWQmF82fN8WjuhO3OX0gpDbydxRktqI5ZqblsryV6poB0g+OkCqThbDUp3TL6TjPqySTI1CZ8qoOBYFMubAZYVJAEfxl0UxoQE+uTsRarRqr8rI="

arch:
  - amd64
#  - arm64
os: linux

cache:
  apt: true

addons:
  apt:
    packages:
    - libgpm-dev
    - gcc-5
    - g++-5
    - sqlite3
    - libsqlite3-dev
    - language-pack-fr
    - libpcre3-dev
    - libbz2-dev
    - libncursesw5-dev
    - libreadline6-dev
    sources:
    - ubuntu-toolchain-r-test
    - sourceline: deb http://cz.archive.ubuntu.com/ubuntu xenial main
  coverity_scan:
    project:
      name: tstack/lnav
      description: The Log File Navigator
    notification_email: timothyshanestack@gmail.com
    build_command_prepend: ./autogen.sh && ./configure
    build_command: make
    branch_pattern: coverity_scan
deploy:
  provider: releases
  skip_cleanup: true
  api_key:
    secure: BQOrhEaDcR53WPGDmBj8UcCtcUjmuTb5g4u1oNhIiF0G5+8UweXOquLf8c52uIkUBYuruc/TB7qWGNisO3skSTh9t8+6v6PE1EAwk5PzavsQqqCmGF32izw75B8TC6SFWQY7AFyKjIc/bHxyz0FA0L2YtvMREtF3jF9ezGek07Y=
  file: lnav*.zip
  file_glob: true
  on:
    tags: true
