dist: bionic

cache:
  bundler: true

compiler:
  - gcc
  - clang

language: ruby
rvm:
  - 2.5
  - 2.6
  - 2.7
  - 3.0
  - truffleruby-head

env:
  matrix:
    - RAKE_COMPILER_OPTIONS="-- --enable-static"
    - RAKE_COMPILER_OPTIONS="-- --disable-static"
    - RAKE_COMPILER_OPTIONS="-- --use-system-libraries"

branches:
  only:
    - main

notifications:
  email:
    on_success: never
    on_failure: always

before_install:
  - if [[ $RAKE_COMPILER_OPTIONS =~ use-system-libraries ]]; then sudo apt update && sudo apt install libmagic1 libmagic-dev; fi

before_script:
  - bundle exec rake clean

script:
  - bundle exec rake compile $RAKE_COMPILER_OPTIONS
  - bundle exec rake test

dist: bionic

cache:
  bundler: true

language: ruby
rvm:
  - 2.5
  - 2.6
  - 2.7
  - 3.0
  - truffleruby-head

env:
  matrix:
    - COMPILER=gcc RAKE_COMPILER_OPTIONS="-- --enable-static"
    - COMPILER=clang RAKE_COMPILER_OPTIONS="-- --enable-static"
    - COMPILER=gcc RAKE_COMPILER_OPTIONS="-- --disable-static"
    - COMPILER=clang RAKE_COMPILER_OPTIONS="-- --disable-static"
    - COMPILER=gcc RAKE_COMPILER_OPTIONS="-- --use-system-libraries"
    - COMPILER=clang RAKE_COMPILER_OPTIONS="-- --use-system-libraries"

branches:
  only:
    - main

notifications:
  email:
    on_success: never
    on_failure: always

before_install:
  - export CC="$(which $COMPILER)"
  - if [[ $RAKE_COMPILER_OPTIONS =~ use-system-libraries ]]; then sudo apt update && sudo apt install libmagic1 libmagic-dev; fi

before_script:
  - bundle exec rake clean

script:
  - bundle exec rake compile $RAKE_COMPILER_OPTIONS
  - bundle exec rake test

Add compiler to the build matrix in Travis CI
Add compiler to the build matrix in Travis CI

Sadly, the "compiler" setting does not seem to be supported for
languages that are not C/C++ or similar.

Signed-off-by: Krzysztof Wilczyński <5f1c0be89013f8fde969a8dcb2fa1d522e94ee00@linux.com>
