Compile a library from specified repo and revision #19
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.
This PR adds a compile-before-test support for SSL/TLS libraries, which compiles the given library from specified repository before the testing itself. Due to limitations of Travis, this solution is a 'little' hack and it's sort of cumbersome, but it works (at least for now).
Current implementation does a check before the testing for a library-repo file in the root of the git repository. This file has following format:
Meaning of each variable is self-explanatory (DEV_LIBRARY_NAME can be gnutls, nss or openssl). If this file is found, it is sourced, content of each variable is checked and if it's a valid combination, the scripts/lib-compile.sh script is executed with the parsed settings.
This file contains a compilation and installation phase for each supported library. All these phases definitely need improvements, as they are a minimal working example. If the compilation succeeds, the usual testing phase is executed, otherwise the build is aborted and build/installation logs are printed to the Travis log.
Current issues:
Ideally, there should be some (unfortunately) external infrastructure, which would make scratch builds for each supported OS. which could be easily installed and tested.
As for the CI part - Travis does not support job-triggering by external repository [0], so this patch can be used in following scenarios:
The second part could be easily scripted, but that would be another hack...
We discussed this solution with @ep69, but if we want to use only Travis, there's not much we can do to make this solution less hacky.
[0] travis-ci/travis-ci#631