-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (58 loc) · 1.54 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
env:
# https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
# actions-rust-lang/setup-rust-toolchain sets some default RUSTFLAGS
RUSTFLAGS: ""
jobs:
lint:
strategy:
matrix:
toolchain:
- stable
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: Checkout branch
uses: actions/checkout@v2
- uses: ./.github/actions/setup
with:
toolchain: ${{ matrix.toolchain }}
- name: Check formatting
run: cargo fmt --all --verbose -- --check
- name: Cargo check
run: cargo clippy --color=always --verbose --all-targets
project-build:
strategy:
matrix:
toolchain:
# Oldest supported nightly
- nightly-2024-02-18
- nightly
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: Checkout branch
uses: actions/checkout@v3
- uses: rust3ds/actions/setup@v1
with:
toolchain: ${{ matrix.toolchain }}
- name: Install cargo-3ds
uses: actions-rs/cargo@v1
with:
command: install
args: --locked --path .
- name: Create new project
run: cargo 3ds new app --bin
- name: Build project
working-directory: ./app
run: cargo 3ds build --release