You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR adds additional compiler and platform testing to Travis. It will probably help avoid surprises in the future. It is an inexpensive insurance policy that takes nearly no effort once setup. The trick is digging into the Travis docs to set it up. (It is a lot easier when someone provides a Travis config as a starting point).
We use a similar Travis config for Crypto++. I know Jack Lloyd uses a similar Travis config for Botan. In fact, Crypto++ uses Travis for Linux, OS X, Android and iOS testing.
On the downside, I have not been able to fully test it. I think GitHub is having some problems. When I try to enable Unbound testing on my GitHub fork, I get an error "An error happened when we tried to alter settings on GitHub. It may be caused by API restrictions, please review and add your authorized Orgs."
Travis is generous with opens source projects. They provide containers with two cores, and ask we keep jobs below about 80 or 100 or so. Unbound will be fine with a dozen jobs.
Thanks @gthess. Sorry I could not run the tests before it landed on your desk.
OK, the first Travis results are good. Most platforms tested OK. The one failure is OS X.
You have several choices now. First, you can add OS X as an allowed failure so Travis will report success. So you can add this to the bottom of .travis.yml:
allow_failures:
-os: osx
OS X provides an antique version OpenSSL, so you will probably want to update it eventually so the test succeeds.
Second, you can use Brew to install an updated version of OpenSSL. That might looks something like this:
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
brew install openssl
fi
Third, you can fetch OpenSSL using curl, and build and install OpenSSL in the before_install recipe. The one sharp edge is, OS X provides curl out of the box, not wget.
I think we are close. Here is the failed configure message after the Brew install of OpenSSL.
checking for SSL... configure: error: Cannot find the SSL libraries in /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr
I'm thinking configure may need to look in /usr/local for Brew installs of OpenSSL on OS X. That is, headers are in /usr/local/include and libs are in /usr/local/lib. But it is just a guess at this point.
Generally speaking, use Bionic images unless you are testing an old compiler. Old compilers give trouble using Trusty and Xenial on PowerPC and s390x. Testing old compilers (like GCC 4.8) is fine, you just have to know what to expect.
Also, avoid the "matrix expansion". You do that by (1) avoiding the top level keys like os: and compiler:, and (2) specifying the exact job you want to run in jobs:.
For example, don't do this (this implicitly creates the matrix expansion):
# top level keys
os:
- linux
- osx
compiler:
- gcc
- clang
Instead, do this (this is what you are doing now):
# only job is top level
jobs:
include:
- os: linux
compiler: gcc
arch: amd64
dist: bionic
- os: linux
compiler: clang
arch: amd64
dist: bionic
...
Avoiding matrix expansion will save you a lot of headaches down the road when you are trying to craft tests on platforms. Especially if you add Android and iOS testing.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Everyone,
This PR adds additional compiler and platform testing to Travis. It will probably help avoid surprises in the future. It is an inexpensive insurance policy that takes nearly no effort once setup. The trick is digging into the Travis docs to set it up. (It is a lot easier when someone provides a Travis config as a starting point).
We use a similar Travis config for Crypto++. I know Jack Lloyd uses a similar Travis config for Botan. In fact, Crypto++ uses Travis for Linux, OS X, Android and iOS testing.
On the downside, I have not been able to fully test it. I think GitHub is having some problems. When I try to enable Unbound testing on my GitHub fork, I get an error "An error happened when we tried to alter settings on GitHub. It may be caused by API restrictions, please review and add your authorized Orgs."
Travis is generous with opens source projects. They provide containers with two cores, and ask we keep jobs below about 80 or 100 or so. Unbound will be fine with a dozen jobs.