Switch to github actions

This commit is contained in:
oreo639 2021-02-25 15:44:11 -08:00 committed by fincs
parent 858ef9408c
commit 4e25fb1d6c
9 changed files with 63 additions and 60 deletions

21
.github/workflows/build.yaml vendored Normal file
View File

@ -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

40
.github/workflows/doxygen.yaml vendored Normal file
View File

@ -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

View File

@ -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=

View File

@ -1,5 +0,0 @@
#!/bin/bash -ex
source /etc/profile.d/devkit-env.sh
make -C libctru/libctru

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -1,6 +1,6 @@
# libctru - CTR User Library # 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) Library for writing user mode ARM11 code for the 3DS (CTR)

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "libctru"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # 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 # 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 # for a project that appears at the top of each page and should give viewer a