diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..fd15f1a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,21 @@ +name: Build libctru + +on: + push: + branches: [ master ] + pull_request: + +jobs: + build: + name: Test build + runs-on: ubuntu-latest + container: + image: 'devkitpro/devkitarm' + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: build + run: make -C libctru diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml new file mode 100644 index 0000000..57894e9 --- /dev/null +++ b/.github/workflows/doxygen.yaml @@ -0,0 +1,40 @@ +name: Build documentation + +on: + push: + tags: [ v* ] + +jobs: + build: + name: Build documentation + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Get current tag + id: vars + run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + + - name: Set up Doxygen + run: sudo apt-get install -y doxygen + + - name: Display Doxygen version + run: echo "Doxygen version $(doxygen -v)" + + - name: Build documentation + run: | + git clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples + cd libctru + CTRU_VERSION=${{ steps.vars.outputs.tag }} doxygen Doxyfile + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: libctru/docs/html + CLEAN: true + SINGLE_COMMIT: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 086e2dc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: c - -os: linux -dist: bionic - -services: docker - -#Cache doxygen -cache: - directories: - - /home/travis/doxygen/doxygen-1.8.18/bin - -before_install: - # Travis has an OLD doxygen build, so we fetch a recent one - - export DOXY_BINPATH=/home/travis/doxygen/doxygen-1.8.18/bin - - export PATH=$PATH:$DOXY_BINPATH - - if [ -n "$TRAVIS_TAG" ]; then bash .travis/doxyprep.sh; fi - - if [ -n "$TRAVIS_TAG" ]; then openssl aes-256-cbc -k $deploy_password -in .travis/id_travis_deploy.enc -out .travis/id_travis_deploy -d; fi - -install: - - docker pull devkitpro/devkitarm - -script: - - docker run -e ENABLE_COMPATIBILITY_REPORTING -v $TRAVIS_BUILD_DIR:/libctru devkitpro/devkitarm /bin/bash -ex /libctru/.travis/docker.sh - -before_deploy: - - sh .travis/exportdoc.sh - -deploy: - provider: pages - deploy_key: .travis/id_travis_deploy - edge: true - keep_history: false - fqdn: libctru.devkitpro.org - local_dir: libctru/docs/html - on: - tags: true - -env: - global: - secure: b3rLutBX7Nqp4DBh8IeBDfxcxlBsceLDhmAXcREk8jTAHPDZ+MncuuExTCxejFmZO7qnZsU4veXDa6l9DsvpY3vGHqxodICQlT5oTnIfZSrPG2GI5xVNLKske5olmR0taM0/BzdlqO8N2ML9uzSXPcbX1bdYdzVoNMuTblc44RM= diff --git a/.travis/docker.sh b/.travis/docker.sh deleted file mode 100644 index b8b4f6d..0000000 --- a/.travis/docker.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -ex - -source /etc/profile.d/devkit-env.sh - -make -C libctru/libctru diff --git a/.travis/doxyprep.sh b/.travis/doxyprep.sh deleted file mode 100644 index a000513..0000000 --- a/.travis/doxyprep.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [ ! -e "$DOXY_BINPATH/doxygen" ]; then - mkdir -p ~/doxygen && pushd ~/doxygen - wget http://doxygen.nl/files/doxygen-1.8.18.linux.bin.tar.gz - tar xzf doxygen-1.8.18.linux.bin.tar.gz - popd -fi diff --git a/.travis/exportdoc.sh b/.travis/exportdoc.sh deleted file mode 100644 index 152e7cb..0000000 --- a/.travis/exportdoc.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -git clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples -cd libctru -doxygen Doxyfile diff --git a/.travis/id_travis_deploy.enc b/.travis/id_travis_deploy.enc deleted file mode 100644 index 8f06ab3..0000000 Binary files a/.travis/id_travis_deploy.enc and /dev/null differ diff --git a/README.md b/README.md index b93d607..5666868 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # libctru - CTR User Library -[![Build Status](https://travis-ci.org/devkitPro/libctru.svg?branch=master)](https://travis-ci.org/devkitPro/libctru) +![Build Status](https://github.com/devkitPro/libctru/actions/workflows/build.yaml/badge.svg) Library for writing user mode ARM11 code for the 3DS (CTR) diff --git a/libctru/Doxyfile b/libctru/Doxyfile index ccd183c..c686766 100644 --- a/libctru/Doxyfile +++ b/libctru/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "libctru" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "$(TRAVIS_TAG)" +PROJECT_NUMBER = "$(CTRU_VERSION)" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a