|
|
|
name: Setup Rust3DS
|
|
|
|
description: Set up CI environment for Rust + 3DS development
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
toolchain:
|
|
|
|
description: The Rust toolchain to use for the steps
|
|
|
|
required: true
|
|
|
|
default: nightly
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Setup default Rust toolchain
|
|
|
|
# Use this helper action so we get matcher support
|
|
|
|
# https://github.com/actions-rust-lang/setup-rust-toolchain/pull/15
|
|
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
with:
|
|
|
|
components: clippy, rustfmt, rust-src
|
|
|
|
toolchain: ${{ inputs.toolchain }}
|
|
|
|
rustflags: ""
|
|
|
|
|
|
|
|
- name: Set up Rust cache
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
with:
|
|
|
|
shared-key: rust3ds
|
|
|
|
|
|
|
|
- name: Install build tools for host
|
|
|
|
shell: bash
|
|
|
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
|
|
|
|
|
|
|
- name: Install cargo-3ds
|
|
|
|
shell: bash
|
|
|
|
# TODO: replace with crates.io version once published
|
|
|
|
run: cargo install --locked --git https://github.com/rust3ds/cargo-3ds
|
|
|
|
|
|
|
|
- name: Set PATH to include devkitARM
|
|
|
|
shell: bash
|
|
|
|
# For some reason devkitARM/bin is not part of the default PATH in the container
|
|
|
|
run: echo "${DEVKITARM}/bin" >> $GITHUB_PATH
|