mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-23 10:51:30 +11:00
Switch to Github Actions (#105)
- Remove travis ci config - Add Github action for CI
This commit is contained in:
parent
5a3bf4630d
commit
263f7909de
69
.github/workflows/ci.yaml
vendored
Normal file
69
.github/workflows/ci.yaml
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
name: ci
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkitarm:latest
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- { toolchain: nightly }
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Add devkitARM bin to PATH
|
||||
run: echo "/opt/devkitpro/devkitARM/bin" >> $GITHUB_PATH
|
||||
- name: Install Apt Dependencies
|
||||
run: apt-get update && apt-get install -y --no-install-recommends build-essential libssl-dev
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust.toolchain }}
|
||||
default: true
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Install Rust Source
|
||||
run: rustup component add rust-src
|
||||
- name: Install cargo-xbuild crate
|
||||
uses: actions-rs/install@v0.1
|
||||
with:
|
||||
crate: cargo-xbuild
|
||||
version: latest
|
||||
use-tool-cache: true
|
||||
- name: Install cargo-make crate
|
||||
uses: actions-rs/install@v0.1
|
||||
with:
|
||||
crate: cargo-make
|
||||
version: latest
|
||||
use-tool-cache: true
|
||||
- name: Make Test Linux
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust.toolchain }}
|
||||
command: make
|
||||
args: test linux
|
||||
- name: Make Release
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust.toolchain }}
|
||||
command: make
|
||||
args: justrelease
|
||||
build-book:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
default: true
|
||||
- name: Install mdbook crate
|
||||
uses: actions-rs/install@v0.1
|
||||
with:
|
||||
crate: mdbook
|
||||
version: latest
|
||||
use-tool-cache: true
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the book
|
||||
run: cd book && mdbook build
|
58
.travis.yml
58
.travis.yml
|
@ -1,58 +0,0 @@
|
|||
language: rust
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
# Cache ONLY .cargo, not target/ like usual
|
||||
directories:
|
||||
- $HOME/.cargo
|
||||
|
||||
branches:
|
||||
only:
|
||||
- staging
|
||||
- trying
|
||||
- master
|
||||
- lokathor
|
||||
|
||||
rust:
|
||||
- nightly
|
||||
|
||||
before_script:
|
||||
- rustup component add rust-src
|
||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
||||
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
|
||||
- (test -x $HOME/.cargo/bin/cargo-make || cargo install cargo-make)
|
||||
- (test -x $HOME/.cargo/bin/mdbook || cargo install mdbook)
|
||||
- cargo install-update -a
|
||||
|
||||
script:
|
||||
# Obtain the devkitPro tools, using `target/` as a temp directory
|
||||
- mkdir -p target
|
||||
- cd target
|
||||
- wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
|
||||
- sudo dpkg -i devkitpro-pacman.deb
|
||||
- sudo dkp-pacman -Sy
|
||||
- sudo dkp-pacman -Syu
|
||||
- sudo dkp-pacman -S -v --noconfirm gba-tools devkitARM
|
||||
- export PATH="$PATH:/opt/devkitpro/devkitARM/bin"
|
||||
- export PATH="$PATH:/opt/devkitpro/tools/bin"
|
||||
- cd ..
|
||||
# Run all verificaions, both debug and release
|
||||
- cargo test --lib
|
||||
- cargo test --lib --release
|
||||
- cargo test --tests
|
||||
- cargo test --tests --release
|
||||
# Let cargo make take over the rest
|
||||
- cargo make justrelease
|
||||
# Test a build of the book so that a failed book build kills this run
|
||||
- cd book && mdbook build
|
||||
|
||||
deploy:
|
||||
provider: pages
|
||||
local-dir: target/book-output
|
||||
skip-cleanup: true
|
||||
github-token: $GITHUB_TOKEN
|
||||
keep-history: false
|
||||
name: DocsBot
|
||||
verbose: true
|
||||
on:
|
||||
branch: master
|
Loading…
Reference in a new issue