-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up reusable workflow and add doctests
- Loading branch information
1 parent
474cb2e
commit 158e6a5
Showing
2 changed files
with
65 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Setup | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
toolchain: | ||
required: true | ||
type: string | ||
|
||
env: | ||
# https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html | ||
CARGO_UNSTABLE_SPARSE_REGISTRY: "true" | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
container: devkitpro/devkitarm | ||
steps: | ||
# https://github.com/nektos/act/issues/917#issuecomment-1074421318 | ||
- if: ${{ env.ACT }} | ||
name: Hack container for local development | ||
run: | | ||
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
- name: Checkout branch | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup default Rust toolchain | ||
# Use this helper | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy, rustfmt, rust-src | ||
toolchain: ${{ matrix.toolchain }} | ||
|
||
- name: Install build tools for host | ||
run: sudo apt-get update && sudo apt-get install -y build-essential | ||
|
||
- name: Install cargo-3ds | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
# TODO: this should probably just be a released version from crates.io | ||
# once cargo-3ds gets published somewhere... | ||
# also switch to hash once feature/doctests gets merged | ||
args: >- | ||
--git https://github.com/rust3ds/cargo-3ds | ||
--rev feature/doctests |