From b601c71dddc9b6e1b84f9384d236e213c836d688 Mon Sep 17 00:00:00 2001 From: Oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Wed, 27 Mar 2019 19:07:02 -0700 Subject: [PATCH] Update travis to build Doxygen. --- .travis.yml | 22 ++++++++++++---------- .travis/deps.sh | 4 ---- .travis/exportdoc.sh | 6 ++++++ exportdoc.sh | 13 ------------- 4 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 .travis/deps.sh create mode 100644 .travis/exportdoc.sh delete mode 100644 exportdoc.sh diff --git a/.travis.yml b/.travis.yml index 870502a..ae1b9c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/.travis/deps.sh b/.travis/deps.sh deleted file mode 100644 index 4661cb0..0000000 --- a/.travis/deps.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -ex - -docker pull devkitpro/devkitarm - diff --git a/.travis/exportdoc.sh b/.travis/exportdoc.sh new file mode 100644 index 0000000..13f842e --- /dev/null +++ b/.travis/exportdoc.sh @@ -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 diff --git a/exportdoc.sh b/exportdoc.sh deleted file mode 100644 index 0a85d9d..0000000 --- a/exportdoc.sh +++ /dev/null @@ -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