-
Notifications
You must be signed in to change notification settings - Fork 15
120 lines (99 loc) · 2.44 KB
/
tests.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Tests
on:
pull_request:
push:
branches: [main, master]
env:
RUSTUP_MAX_RETRIES: 10
CARGO_INCREMENTAL: 1
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
jobs:
build:
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- name: Tests
run: cargo test --verbose
format:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
toolchain: stable
- name: Check
run: cargo fmt -- --check
integration:
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
sdk:
- latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rust-src
target: thumbv7em-none-eabihf
profile: minimal
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v1
- name: Install Crank
run: cargo install --path . --force
- name: Checkout Crankstart
uses: actions/checkout@v3
with:
repository: pd-rs/crankstart
path: crankstart
- name: Install Playdate SDK
id: sdk
# then use ${{ steps.sdk.outputs.root/version }}
uses: pd-rs/get-playdate-sdk@main
with:
version: ${{ matrix.sdk }}
- name: Info
run: |
which pdc
pdc --version
- name: Build Examples
env:
RUST_LOG: trace
run: |
cd crankstart
# build projects without graphical dependencies:
# hello world
crank build --release --example=hello_world
crank build --release --example=hello_world --device
# life game
crank build --release --example=life
crank build --release --example=life --device
# TODO: check existence of produced packages