Skip to content

Instantly share code, notes, and snippets.

@sxlijin
Last active October 24, 2016 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sxlijin/a2deb9a53e4b130f0e62a259c6e85d84 to your computer and use it in GitHub Desktop.
Save sxlijin/a2deb9a53e4b130f0e62a259c6e85d84 to your computer and use it in GitHub Desktop.
Example .travis.yml for CS3251
language: cpp
sudo: false
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- george-edison55-precise-backports
packages:
- clang-3.8
- cmake-data
- cmake
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- g++-6
- cmake-data
- cmake
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
before_install:
# update envvar config
- eval $MATRIX_EVAL
# report versions
- cmake --version
- $CXX --version
install:
# setup cmake
- mkdir bin
script:
- cd bin && cmake .. && make && echo "Executing compiled binaries:" && { ./3b-array; ./3b-list; }
after_success:
- echo "Yay! Your code compiled and runs fine."
after_failure:
- echo "Uh-oh - something is wrong with your code!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment