Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TRAVIS_COMPILER to env #542

Closed
wants to merge 1 commit into from
Closed

Add TRAVIS_COMPILER to env #542

wants to merge 1 commit into from

Conversation

sfegan
Copy link
Contributor

@sfegan sfegan commented Nov 3, 2015

This allows user’s choice of compiler to be passed through to build
script for C and C++ without undergoing any processing, as it does now
with C++ (e.g. stripping of version number)

The main reason for this is to avoid duplicating the compiler in the "env" and "compiler"
directives, as here for example:

https://github.com/sfegan/calin/blob/master/.travis.yml

Which would make specifying the build matrix much easier, e.g. as here:

https://github.com/sfegan/travis_container_test/blob/master/.travis.yml

In that last script I would of course have to put some logic in to use the TRAVIS_COMPILER variable to set CC and CPP, but I didn't do that there.

Of course it is possible to avoid the duplication by simply specifying "g++" generically as the "compiler" and using an "env" to specify the version, but that misses out having a per-"compiler" cache (which is essential to me) and also means the true compiler version doesn't show up in the build status page, as here:

https://travis-ci.org/sfegan/travis_container_test

Thanks,
Steve

PS. I love Travis CI

This allows user’s choice of compiler to be passed through to build
script for C and C++ without undergoing any processing, as it does now
with C++ (e.g. stripping of version number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant