Update travis to build Doxygen.

This commit is contained in:
Oreo639 2019-03-27 19:07:02 -07:00 committed by fincs
parent 2750c4a70b
commit fd1006b682
4 changed files with 18 additions and 27 deletions

View File

@ -1,5 +1,7 @@
language: c
os: linux
dist: xenial
sudo: required
services: docker
@ -8,9 +10,6 @@ services: docker
cache:
directories:
- /home/travis/doxygen/doxygen-1.8.15/bin
env:
global:
- secure: "SYuVfyfmO6P+KnOXFZpNbBLO3QpGZJjIvFJHix3+xAfjENZoCzn+A7Gmcbm07VN0UB9sDJrYklyUrUepVWSuOd+FiNEyiLi4oYXxFzDjA9am7W1nFEaBAw6Ilifg7KX2OlClXaF7iiQ1udtmN9Uw+1LwfpldDDqti1H9TANaKHc="
before_install:
# Travis has an OLD doxygen build, so we fetch a recent one
@ -25,11 +24,14 @@ install:
script:
- docker run -e ENABLE_COMPATIBILITY_REPORTING -v $TRAVIS_BUILD_DIR:/libctru devkitpro/devkitarm /bin/bash -ex /libctru/.travis/docker.sh
after_success:
- cd $TRAVIS_BUILD_DIR
- #Build the doxygen files and upload to GH pages
- git config --global user.email "travis@travis-ci.org"
- git config --global user.name "TravisCI-DocBuilder"
# Build the doxygen documentation and push it to gh-pages if this is a tagged release
- sh exportdoc.sh
- sh .travis/exportdoc.sh
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: libctru/docs/html
on:
tags: true
branch: master

View File

@ -1,4 +0,0 @@
#!/bin/sh -ex
docker pull devkitpro/devkitarm

6
.travis/exportdoc.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
if [ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
git clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples
cd libctru
doxygen Doxyfile
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
if [ "$TRAVIS_REPO_SLUG" = "smealum/ctrulib" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$TRAVIS_TAG" ]; then
git clone --branch=gh-pages --single-branch --depth 1 --no-checkout https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG docs
git clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples
cd libctru
doxygen Doxyfile
mv ./docs/html/* ../docs
cd ../docs
git add --all
git commit -m"Doc generated from commit $TRAVIS_COMMIT"
git push -f origin gh-pages
fi