Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Have Travis CI upload rustdoc-generated documentation to GitHub Pages.
  • Loading branch information
SimonSapin committed Aug 4, 2014
commit 64c3ee2ea7898686420b8a5fe170fe41555a5509
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
*-test
Makefile
/target
/doc
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,18 @@ install:
- sudo ./cargo-nightly/install.sh

script:
- cargo build --verbose
- cargo test --verbose
- cargo build
- cargo test
- rustdoc lib.rs -L target/deps

after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
echo '<meta http-equiv=refresh content=0;url=cssparser/index.html>' > doc/index.html &&
sudo pip install ghp-import &&
ghp-import -n doc &&
git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages

env:
- secure: TDTC2q5Trv22R1pXcMyi2mWToc201aJpCJgLlnwNzkT2bjpQj+0KQvBpI1gIoeQvSL9ud85187C0tdmR7zQmZjBt6mnNCs7EM7QDIPcUcrH0vz8v/RQ+VNxhRAeCwUP4uLEHtnvbi9Q0KXCI1cQivZuMspxVMwvajx/ylcPwb4k=

9 changes: 9 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ AR ?= ar
RUSTC ?= rustc
RUSTFLAGS ?=
EXT_DEPS ?=
RUSTDOC ?= rustdoc
RUSTDOC_FLAGS ?=
RUSTDOC_TARGET ?= doc

RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs')

Expand All @@ -28,6 +31,12 @@ check: cssparser-test
check-debug: cssparser-tests
echo -e "start\n break upcall_fail\n continue\n where\n continue" | gdb -q ./cssparser-tests

.PHONY: doc
doc: $(RUSTDOC_TARGET)/cssparser/index.html

$(RUSTDOC_TARGET)/cssparser/index.html: lib.rs $(RUST_SRC) $(EXT_DEPS)
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)

.PHONY: clean
clean:
rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test