2021-04-11 03:58:50 +10:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-04-11 04:03:55 +10:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-04-11 03:58:50 +10:00
|
|
|
- name: Install build tools
|
2021-04-11 07:32:02 +10:00
|
|
|
run: sudo apt-get update && sudo apt-get install build-essential binutils-arm-none-eabi mgba-qt -y
|
2021-04-11 03:58:50 +10:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Nightly rust with required components
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
components: clippy, rust-src
|
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2.1.1
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ steps.rust_install.outputs.rustc_hash }}
|
|
|
|
|
2021-04-11 07:32:02 +10:00
|
|
|
- name: install mgba-test-runner
|
|
|
|
run: cargo install --git https://github.com/corwinkuiper/mgba-test-runner.git
|
2021-04-11 03:58:50 +10:00
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
2021-04-11 07:32:02 +10:00
|
|
|
- name: Run Tests
|
|
|
|
run: cargo test --verbose
|
2021-04-11 03:58:50 +10:00
|
|
|
- name: Run Clippy
|
|
|
|
run: cargo clippy --verbose
|