-
Notifications
You must be signed in to change notification settings - Fork 9
152 lines (144 loc) · 3.89 KB
/
rust.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: All Checks
on: [push, pull_request]
jobs:
gen-ral:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install a stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
# Not using actions-rs/install, since it's experimental.
# Guessing that this tool isn't in the tool cache, so
# there's no benefit.
- name: Install svdtools
uses: actions-rs/cargo@v1
with:
command: install
args: svdtools --version=0.2.8
- name: Generate RAL
run: make ci
- name: Check format for RAL
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
lints:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
- name: Lint raltool
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --package=raltool
- name: Lint imxrt-ral
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --package=imxrt-ral --features=imxrt1062,rt
build-ral-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Test imxrt-ral for core features
uses: actions-rs/cargo@v1
with:
command: test
args: --tests --lib
build-ral:
runs-on: ubuntu-latest
strategy:
matrix:
feature:
# Individual chips
- "imxrt1011,rt"
- "imxrt1015,rt"
- "imxrt1021,rt"
- "imxrt1051,rt"
- "imxrt1052,rt"
- "imxrt1061,rt"
- "imxrt1062,rt"
- "imxrt1064,rt"
- "imxrt1176_cm4,rt"
- "imxrt1176_cm7,rt"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
profile: minimal
- name: Build for ${{ matrix.feature }} RAL
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --features ${{ matrix.feature }} --target thumbv7em-none-eabihf
# Run documentation tests
#
# Doctests might not work for all features.
doctest-ral:
runs-on: ubuntu-latest
strategy:
matrix:
feature:
- "imxrt1062,rt"
- "imxrt1021,rt"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Run doctests for (${{ matrix.feature }}) RAL
uses: actions-rs/cargo@v1
with:
command: test
args: --doc --verbose --features ${{ matrix.feature }}
# Run unit, integration tests
test-ral:
runs-on: ubuntu-latest
strategy:
matrix:
feature:
- "imxrt1011"
- "imxrt1021"
- "imxrt1062,rt"
- "imxrt1176_cm4"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Run unit, integration tests for ${{ matrix.feature }}
uses: actions-rs/cargo@v1
with:
command: test
args: --tests --lib --verbose --features ${{ matrix.feature }}
examples-teensy4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
profile: minimal
- name: Build examples/teensy4
uses: actions-rs/cargo@v1
with:
command: build
args: --package=imxrt-ral-examples-teensy4 --target thumbv7em-none-eabihf