pirovc/ganon:.travis.yml@bdb9666
language: cpp
dist: focal
matrix:
include:
- name: "osx AppleClang 10 (xcode10.2/macOS 10.14)"
os: osx
osx_image: xcode10.2
addons:
homebrew: { packages: [coreutils, gawk, grep],
update: false }
env:
- PATH="$(brew --prefix coreutils)/libexec/gnubin:$(brew --prefix grep)/libexec/gnubin:$PATH"
- MATRIX_EVAL="BUILD_TYPE=Release"
- name: "osx AppleClang 11 (xcode11/macOS 10.14.6)"
os: osx
osx_image: xcode11
addons:
homebrew: { packages: [coreutils, gawk, grep],
update: false }
env:
- PATH="$(brew --prefix coreutils)/libexec/gnubin:$(brew --prefix grep)/libexec/gnubin:$PATH"
- MATRIX_EVAL="BUILD_TYPE=Release"
- name: "linux gcc-7"
os: linux
addons:
apt: { packages: [g++-7],
sources: [ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && BUILD_TYPE=Release"
- name: "linux gcc-7 (coverage)"
os: linux
addons:
apt: { packages: [g++-7, lcov],
sources: [ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && BUILD_TYPE=Coverage && GCOV=gcov-7"
- name: "linux gcc-8"
os: linux
addons:
apt: { packages: [g++-8],
sources: [ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && BUILD_TYPE=Release"
- name: "linux gcc-9"
os: linux
addons:
apt: { packages: [g++-9],
sources: [ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=gcc-9 && CXX=g++-9 && BUILD_TYPE=Release"
- name: "linux clang-7"
os: linux
addons:
apt: { packages: [clang-7, g++-7],
sources: [llvm-toolchain-xenial-7, ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && BUILD_TYPE=Release"
- name: "linux clang-8"
os: linux
addons:
apt: { packages: [clang-8, g++-8],
sources: [llvm-toolchain-xenial-8, ubuntu-toolchain-r-test] }
env: MATRIX_EVAL="CC=clang-8 && CXX=clang++-8 && BUILD_TYPE=Release"
before_install:
- eval "${MATRIX_EVAL}"
- sudo python3 -m pip install --upgrade pip
- sudo python3 -m pip install "pandas>=0.22.0"
- sudo python3 -m pip install binpacking==1.4.3
- binpacking -h # ret 0
- git clone https://github.com/pirovc/pylca.git
- cd pylca
- git checkout d1474b2ec2c028963bafce278ccb69cc21c061fa #v1.0.0
- sudo python3 setup.py install
- cd ..
- git clone https://github.com/pirovc/taxsbp.git
- cd taxsbp
- git checkout 35ffb1e1a92f6199d757dfdd2f1971db29dd4070 # v1.1.1
- sudo python3 setup.py install
- taxsbp -h # ret 0
- cd ..
- if [ "$BUILD_TYPE" == "Coverage" ]; then
sudo python3 -m pip install coverage;
fi
script:
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVERBOSE_CONFIG=ON -DGANON_OFFSET=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCONDA=OFF ..
- cat compile_commands.json
- cmake --build . -- -j2
- ctest -VV .
- sudo make install
- ganon-build -h # ret 0
- ganon-classify -h # ret 0
- cd ..
- python3 -m unittest discover -s tests/ganon/unit/ -v
- python3 -m unittest discover -s tests/ganon/integration/ -v
- sudo python3 setup.py install
- ganon -h # ret 0
after_success:
- if [ "$BUILD_TYPE" == "Coverage" ]; then
lcov --gcov-tool $(which ${GCOV}) -d . -c -o coverage.info;
coverage run --append -m unittest discover -s tests/ganon/unit/ -v;
coverage run --append -m unittest discover -s tests/ganon/integration/ -v;
bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports";
fi
notifications:
email: false
Build Config
{
"env": {
"global": [
"PATH=\"${HOME}/bin:${PATH}\"",
"SHELLCHECK_URL=\"https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.4.tar.bz2\"",
"SHFMT_URL=\"https://github.com/mvdan/sh/releases/download/v0.1.0/shfmt_v0.1.0_linux_amd64\""
],
"matrix": [
"INTEGRATION_SPECS=1",
"INTEGRATION_SPECS=0"
]
},
"rvm": "2.3.1",
"dist": "trusty",
"sudo": false,
"cache": {
"apt": true,
"directories": [
"${HOME}/bin"
]
},
"group": "beta",
"addons": {
"apt": {
"packages": [
"bc"
]
}
},
"script": [
"./runtests",
"git diff --exit-code",
"git diff --cached --exit-code",
"if [[ $INTEGRATION_SPECS = 1 ]]; then bundle exec chirp; fi"
],
"language": "ruby",
"after_failure": "bundle exec chirp dumplogs ./log",
"after_success": [
"bundle exec chirp pushback",
"bundle exec chirp sendstats"
],
"notifications": {
"webhooks": {
"urls": [
"https://chirp-tracker-production.herokuapp.com/travis"
],
"on_failure": "never",
"on_success": "always"
}
},
"before_install": [
"mkdir -p \"${HOME}/bin\"",
"if ! shellcheck --version; then curl -sSL \"${SHELLCHECK_URL}\" | tar -C \"${HOME}/bin\" -xjf -; fi",
"if ! command -v shfmt; then curl -sSL \"${SHFMT_URL}\" -o \"${HOME}/bin/shfmt\"; chmod +x \"${HOME}/bin/shfmt\"; fi"
]
}