Move docs to this repo and auto build

This commit is contained in:
Steven Fackler 2015-02-07 21:28:54 -08:00
parent d06f226b3f
commit ec65b0c67b
28 changed files with 45 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
/doc/
target/
Cargo.lock

View File

@ -3,10 +3,15 @@ env:
matrix:
- FEATURES=""
- FEATURES="tlsv1_1 tlsv1_2 aes_xts"
global:
secure: J4i75AV4KMrU/UQrLIzzIh35Xix40Ki0uWjm8j05oxlXVl5aPU2zB30AemDne2QXYzkN4kRG/iRnNORE/8D0lF7YipQNSNxgfiBVoOEfj/NSogvI2BftYX9vlLZJUvt+s/nbE3xa/Pyge1IPv7itDYGO7SMe8RTSqitgqyfE2Eg=
os:
- osx
- linux
- osx
- linux
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:
- cargo test --features "$FEATURES"
- (cd openssl && cargo test --features "$FEATURES")
- ./.travis/build_docs.sh
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./.travis/update_docs.sh

11
.travis/build_docs.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
mkdir doc
for crate in $(echo openssl-sys openssl); do
mkdir -p $crate/target
ln -s -t $crate/target ../../doc
(cd $crate && cargo doc --no-deps)
done

16
.travis/update_docs.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -o errexit -o nounset
git clone --branch gh-pages "https://$GH_TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs
cd deploy_docs
git config user.name "Steven Fackler"
git config user.email "sfackler@gmail.com"
rm -rf doc
mv ../doc .
git add -A .
git commit -m "rebuild pages at ${TRAVIS_COMMIT}"
git push

View File

@ -1,7 +1,7 @@
rust-openssl [![Build Status](https://travis-ci.org/sfackler/rust-openssl.svg?branch=master)](https://travis-ci.org/sfackler/rust-openssl)
============
See the [rustdoc output](https://sfackler.github.io/doc/openssl).
See the [rustdoc output](https://sfackler.github.io/rust-openssl/doc/openssl).
Building
--------

View File

@ -6,6 +6,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>",
license = "MIT"
description = "FFI bindings to OpenSSL"
repository = "https://github.com/sfackler/rust-openssl"
documentation = "https://sfackler.github.io/rust-openssl/doc/openssl-sys"
links = "openssl"
build = "build.rs"

View File

@ -1,6 +1,7 @@
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(dead_code)]
#![feature(core, io, libc, path, std_misc, env)]
#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")]
extern crate libc;

View File

@ -5,7 +5,7 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
license = "Apache-2.0"
description = "OpenSSL bindings"
repository = "https://github.com/sfackler/rust-openssl"
documentation = "https://sfackler.github.io/doc/openssl"
documentation = "https://sfackler.github.io/rust-openssl/doc/openssl"
readme = "README.md"
keywords = ["crypto", "tls", "ssl"]
@ -16,7 +16,7 @@ sslv2 = ["openssl-sys/sslv2"]
aes_xts = ["openssl-sys/aes_xts"]
[dependencies.openssl-sys]
path = "openssl-sys"
path = "../openssl-sys"
version = "0.3.1"
[dev-dependencies]

View File

@ -2,7 +2,7 @@
#![crate_name="openssl"]
#![crate_type="rlib"]
#![crate_type="dylib"]
#![doc(html_root_url="https://sfackler.github.io/doc/openssl")]
#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl")]
extern crate libc;
#[cfg(test)]