mirror of
https://github.com/joel16/uofw.git
synced 2024-11-26 21:10:38 +00:00
Replace Travis-CI with GitHub actions (#68)
This commit is contained in:
parent
a0292a32a3
commit
01cce9eab2
31
.github/workflows/main.yml
vendored
Normal file
31
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Build uOFW
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install doxygen
|
||||
wget http://www.mirari.fr/VmX0 -O psptoolchain.deb
|
||||
sudo dpkg --install psptoolchain.deb
|
||||
- name: Build project
|
||||
run: |
|
||||
source /etc/profile.d/psptoolchain.sh
|
||||
make -k
|
||||
- name: Build documentation
|
||||
run : |
|
||||
mkdir github-pages
|
||||
cd github-pages
|
||||
doxygen ../docs/Doxyfile
|
||||
- name: Deploy documentation
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: github-pages
|
||||
CLEAN: true
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
html/
|
||||
nbproject/
|
||||
github-pages/
|
||||
*.o
|
||||
*.elf
|
||||
*.prx
|
||||
|
64
.travis.yml
64
.travis.yml
@ -1,64 +0,0 @@
|
||||
language: cpp
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "aiH0ZGvhmY7ldfRxngIZHDuWE7ZF5UpVL577hIOUW1P+t+5lOq4hXpTaJgbaEgl0ZQ9GudeFpwx+OvUoxGwLa1wofGGSygeYRl0rfui3XkNx+5RevZ+KOuRQcv+4gJ15twvhP4+XHKfE/B8HWTO5IGN+ntRn+NzXJQLUZFXnOW8=" # GH_AUTH
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get remove mingw* -q
|
||||
|
||||
install:
|
||||
- sudo apt-get install doxygen g++-mingw-w64-i686 -q
|
||||
- cd ..
|
||||
- wget http://www.mirari.fr/VmX0 -O psptoolchain.deb
|
||||
- sudo dpkg --install psptoolchain.deb
|
||||
- source /etc/profile.d/psptoolchain.sh
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
|
||||
script:
|
||||
- make -k
|
||||
|
||||
after_script:
|
||||
- |
|
||||
if [[ $TRAVIS_PULL_REQUEST == 'false' && $TRAVIS_BRANCH == 'master' ]]; then
|
||||
mkdir gh-pages && cd gh-pages
|
||||
git clone "https://github.com/$TRAVIS_REPO_SLUG.git" --branch gh-pages .
|
||||
export GIT_ROOT=$TRAVIS_BUILD_DIR
|
||||
|
||||
if [[ $(git -C $GIT_ROOT log --pretty=%s -1 $TRAVIS_COMMIT) != *"[docs-skip]"* ]]; then
|
||||
doxygen ../docs/Doxyfile
|
||||
fi
|
||||
|
||||
if [[ $(git -C $GIT_ROOT log --pretty=%s -1 $TRAVIS_COMMIT) == *"[exec-build]"* || $(git -C $GIT_ROOT diff-tree --name-only --no-commit-id $TRAVIS_COMMIT $GIT_ROOT/utils) ]]; then
|
||||
cd $GIT_ROOT/utils
|
||||
mkdir -p ../gh-pages/executables
|
||||
|
||||
make mrproper all CC=gcc -m32 CXX=g++ -m32
|
||||
for file in $(find */ -executable -type f); do
|
||||
mv $file "../gh-pages/executables/$(basename $file)-i386"
|
||||
done
|
||||
|
||||
make mrproper all CC="i686-w64-mingw32-gcc -m32" CXX="i686-w64-mingw32-g++ -m32"
|
||||
for file in $(find */ -executable -type f); do
|
||||
mv $file "../gh-pages/executables/$(basename $file)-i386.exe"
|
||||
done
|
||||
fi
|
||||
|
||||
cd $GIT_ROOT/gh-pages
|
||||
|
||||
git config user.email "travis@example.com"
|
||||
git config user.name "uOFW Doc builder"
|
||||
|
||||
git remote set-url origin "https://${GH_AUTH}@github.com/$TRAVIS_REPO_SLUG.git"
|
||||
git checkout gh-pages
|
||||
git add .
|
||||
git commit -am "Rebuilt docs for $TRAVIS_COMMIT"
|
||||
|
||||
git push origin gh-pages 2>&1 | sed "s/${GH_AUTH}/[secure]/gi"
|
||||
fi
|
||||
|
@ -613,8 +613,8 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = "$(GIT_ROOT)/docs/mainpage.dox" \
|
||||
"$(GIT_ROOT)/include/" \
|
||||
INPUT = "../docs/mainpage.dox" \
|
||||
"../include/" \
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
Loading…
Reference in New Issue
Block a user