Thursday, June 18, 2015

Using C++11 in Travis CI

There are many strange solutions, but there is now a better way to do this.

    sudo: false
    language: cpp
    compiler:
      - gcc
      - clang
    install:
    - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-4.8
        - g++-4.8
        - clang

The explicit sudo: false will let it build in Docker (for speed) even if you have a pre-docker repo, according to Travis support.

Thanks to solarce at Travis support for noticing my error and fixing the docs.




No comments:

Post a Comment