]> Chaos Git - corbenik/ctrulib.git/commitdiff
travis CI
authorLectem <lectem@gmail.com>
Sun, 12 Jul 2015 18:21:05 +0000 (20:21 +0200)
committerLectem <lectem@gmail.com>
Fri, 9 Oct 2015 21:58:34 +0000 (17:58 -0400)
.gitignore
.travis.yml [new file with mode: 0644]
exportdoc.sh [new file with mode: 0644]

index 36820a016fbd4fef3367f76b63d95b67d22cce60..bdb1a70fe27dd0909920304cba6ab7260306bacb 100644 (file)
@@ -5,4 +5,6 @@
 Thumbs.db
 build/
 lib/
+docs/
+internal_docs
 build.sh
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..c2a41bf
--- /dev/null
@@ -0,0 +1,47 @@
+language: c
+
+sudo: false
+
+#Cache devkitArm and doxygen
+cache:
+  directories:
+    - /home/travis/devkitPro
+    - /home/travis/doxygen/doxygen-1.8.10/bin
+
+before_install:
+  # Travis has an OLD doxygen build, so we fetch a recent one
+  - export DOXY_BINPATH=/home/travis/doxygen/doxygen-1.8.10/bin
+  - if [ ! -e "$DOXY_BINPATH/doxygen" ]; then mkdir -p ~/doxygen && cd ~/doxygen; fi
+  - if [ ! -e "$DOXY_BINPATH/doxygen" ]; then wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.linux.bin.tar.gz; fi
+  - if [ ! -e "$DOXY_BINPATH/doxygen" ]; then tar xzf doxygen-1.8.10.linux.bin.tar.gz; fi
+  - export PATH=$PATH:$DOXY_BINPATH
+  # Prepare devkitArm update
+  - export DEVKITPRO=/home/travis/devkitPro
+  - export DEVKITARM=${DEVKITPRO}/devkitARM
+  - mkdir -p $DEVKITPRO
+  - cd $DEVKITPRO
+  - wget -N http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl
+  - 
+
+install:
+  - cd $DEVKITPRO
+  # Install or update devkitArm if it's cached
+  - perl devkitARMupdate.pl
+  - cd $TRAVIS_BUILD_DIR
+  
+env:
+  global:
+    - secure: "ENCRYPTED GH_TOKEN HERE"
+  
+script:
+  - cd $TRAVIS_BUILD_DIR/libctru
+  - make
+  
+  
+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 current branch is great-refactor
+  - sh exportdoc.sh
diff --git a/exportdoc.sh b/exportdoc.sh
new file mode 100644 (file)
index 0000000..414bab1
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+if [ "$TRAVIS_REPO_SLUG" = "smealum/ctrulib" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "great-refactor" ]; then
+git clone --branch=gh-pages --single-branch --depth 1 https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG docs
+git rm -rf docs/*
+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