Feature matrix & conditioned doc generation

- Ensures that library builds and passes all tests without any
  features and with `tlsv1_1`, `tlsv1_2` features enabled. Note, 
  that `sslv2` isn’t in test case because on modern linux (like 
  on Travis servers) `SSLv2_method` isn’t in `libssl.so` so it
  builds fine but fails on linking tests.

- For simplification it generates docs after every build, but 
  uploads them once - if it is `master` branch and not a pull
  request.
This commit is contained in:
Valerii Hiora 2014-10-02 10:52:42 +03:00
parent 93b725ea8d
commit 87374ff2c8
2 changed files with 11 additions and 7 deletions

View File

@ -2,16 +2,20 @@ language: rust
env: env:
global: global:
- secure: qLvBJoJOJcPPZ+e31175O6sMUGBHgHe/kBuI0FCPeifYmpFyeRAkEvGddEkf8t3rojV+wE14CNYzzGsT/W/+JY7xW0C1FQKW3r+8SZ1Cave/8ahee0aCQVXGf0XY8c52uG6MrLGiUlNZbOsyFSdFUc/Io+kYZas4DxrinRSOIEA= - secure: qLvBJoJOJcPPZ+e31175O6sMUGBHgHe/kBuI0FCPeifYmpFyeRAkEvGddEkf8t3rojV+wE14CNYzzGsT/W/+JY7xW0C1FQKW3r+8SZ1Cave/8ahee0aCQVXGf0XY8c52uG6MrLGiUlNZbOsyFSdFUc/Io+kYZas4DxrinRSOIEA=
matrix:
- FEATURES=""
- FEATURES="tlsv1_1 tlsv1_2"
os: os:
- osx - osx
- linux - linux
before_script: before_script:
- openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null 2>&1 & - openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null 2>&1 &
script: script:
- cargo build - cargo build --features "$FEATURES"
- cargo test - cargo test --features "$FEATURES"
- rustdoc src/lib.rs - cargo doc --features "sslv2 tlsv1_1 tlsv1_2"
- cargo build --features "sslv2" after_success: |
- cargo build --features "tlsv1_1 tlsv1_2" [ $TRAVIS_BRANCH = master ] &&
after_script: [ $TRAVIS_PULL_REQUEST = false ] &&
- curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh cd target/doc &&
(curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh)

View File