c++githubc++14travis-cibuck

Building with Buck on Travis servers


I am trying to build tests with Buck using buck test C++ targets on Travis CI servers (through GitHub), but there are two things that I am not able to figure out.

  1. I would have to install Buck on the Travis servers. How can I use OS X servers instead of Ubuntu ones? I read in the Travis documentation that it offered OS X servers as well. This way I can just go ahead and do brew tap facebook/fb && brew install buck and I would be done.
  2. Buck requires that I specify the compiler to use in the .buckconfig file in the repository. This however only accepts an absolute path to the compiler to use. Travis CI configurations seem to only provide an environment variable which contains the path to the compiler. Environment variables however cannot be used in the .buckconfig. Is there a way I can install a compiler (one that fully supports C++14) and get the path at which it is installed on the Travis server?

I highlighted the questions so that it's easier for people who do not have experience with all the things that I mentioned (Buck and Travis CI) to still answer the question.


Solution

  • How can I use OS X servers instead of Ubuntu ones?

    That should be what the os directive is for.

    Value has to be linux (default) or osx; or one of the known aliases:
    ubuntu for linux, mac for osx or macos for osx

    (Ironically, buck itself has its own tavis.yml.)

    Environment variables however cannot be used in the .buckconfig.

    You could either: