-
Notifications
You must be signed in to change notification settings - Fork 226
143 lines (140 loc) · 4.38 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
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
name: Continuous Integration
on:
push:
branches:
- main
- next
- wip
pull_request:
jobs:
ci:
name: "${{ matrix.m.type }}: ${{ matrix.m.name }}"
strategy:
fail-fast: true
matrix:
m:
- type: board
name: arduino-uno
examples: true
- type: board
name: arduino-diecimila
examples: true
- type: board
name: arduino-leonardo
examples: true
- type: board
name: arduino-mega2560
examples: true
- type: board
name: arduino-mega1280
examples: true
- type: board
name: sparkfun-promicro
examples: true
- type: board
name: sparkfun-promini-3v3
examples: true
- type: board
name: sparkfun-promini-5v
examples: true
- type: board
name: trinket-pro
examples: true
- type: board
name: trinket
examples: true
- type: board
name: arduino-nano
examples: true
- type: board
name: nano168
examples: true
- type: board
# Not really a board, but also an examples crate
name: atmega2560
examples: true
- type: mcu
name: atmega1280
spec: atmega1280
crate: atmega-hal
- type: mcu
name: atmega32a
spec: atmega32a
crate: atmega-hal
- type: mcu
name: atmega128a
spec: atmega128a
crate: atmega-hal
- type: mcu
name: atmega328pb
spec: atmega328p
crate: atmega-hal
- type: mcu
name: atmega48p
spec: atmega48p
crate: atmega-hal
- type: mcu
name: atmega1284p
spec: atmega1284p
crate: atmega-hal
- type: mcu
name: atmega8
spec: atmega8
crate: atmega-hal
- type: mcu
name: attiny85
spec: attiny85
crate: attiny-hal
- type: mcu
name: attiny88
spec: attiny88
crate: attiny-hal
- type: mcu
name: attiny167
spec: attiny167
crate: attiny-hal
- type: mcu
name: attiny2313
spec: attiny2313
crate: attiny-hal
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-28
components: rust-src
- name: Install avr-gcc, binutils, and libc
run: sudo apt-get install -y avr-libc binutils-avr gcc-avr
- name: Compile board crate and examples
if: "${{ matrix.m.type == 'board' && matrix.m.examples }}"
run: cd "examples/${{ matrix.m.name }}" && cargo build --bins
- name: Compile board crate (without examples)
if: "${{ matrix.m.type == 'board' && !matrix.m.examples }}"
run: cd "arduino-hal/" && cargo build --features "${{ matrix.m.name }}"
- name: Test-compile HAL crate for an MCU
if: "${{ matrix.m.type == 'mcu' }}"
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --features "${{ matrix.m.name }}" -Z build-std=core --target "../../avr-specs/avr-${{ matrix.m.spec }}.json"
- name: Test-compile HAL crate for an MCU (no deprecated globals)
if: "${{ matrix.m.crate == 'attiny-hal' || matrix.m.crate == 'atmega-hal' }}"
run: >-
cd "mcu/${{ matrix.m.crate }}" &&
cargo build --features "${{ matrix.m.name }}-no-deprecated-globals" -Z build-std=core --target "../../avr-specs/avr-${{ matrix.m.spec }}.json"
ravedude:
name: "ravedude"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install libudev
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Check ravedude
run: |
cargo check --manifest-path ravedude/Cargo.toml
- name: Test ravedude
run: |
cargo test --manifest-path ravedude/Cargo.toml