-
Notifications
You must be signed in to change notification settings - Fork 8
182 lines (154 loc) · 4.49 KB
/
build.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
on:
push:
pull_request:
schedule:
- cron: 0 1 * * 1
name: Build
env:
RUSTFLAGS: '-D warnings'
# Deactivated building git version until everything (drivers, hals) are migrated to embedded-hal 1.0
DRIVERS: >
apds9960
ds323x
embedded-ccs811
hdc20xx
isl29125
kxcj9
max170xx
max3010x
max44009
mcp4x
mcp49xx
mcp794xx
mlx9061x
mma8x5x
opt300x
pcf857x
tcs3472
veml6030
veml6075
xca9548a
# The Git version of these drivers are not compatible. Deactivated until a new version is released.
# ad983x
# ads1x1x
# bmi160
# ds1307
# eeprom24x
# lm75
# lsm303agr
# pwm-pca9685
# tmp006
# tmp1x2
# veml6040
# veml6070
jobs:
ci-bare-metal:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta]
SUBFOLDER:
- stm32f3-discovery
- stm32f1-bluepill
- microbit
VERSION:
- released
# - git # Deactivated building git version until everything (drivers, hals) are migrated to embedded-hal 1.0
include:
- SUBFOLDER: stm32f3-discovery
TARGET: thumbv7em-none-eabihf
- SUBFOLDER: stm32f1-bluepill
TARGET: thumbv7m-none-eabi
- SUBFOLDER: microbit
TARGET: thumbv6m-none-eabi
steps:
- uses: actions/checkout@v4
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.OS }}-cargo-
- name: Cache build output dependencies
uses: actions/cache@v2
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.OS }}-build-
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.TARGET }}
- name: Checkout CI scripts
uses: actions/checkout@v4
with:
repository: 'eldruin/rust-driver-ci-scripts'
ref: 'master'
path: 'ci'
- run: ../ci/patch-no-std.sh
working-directory: ${{ matrix.SUBFOLDER }}
- run: ../ci/patch-git-drivers.sh
working-directory: ${{ matrix.SUBFOLDER }}
if: contains(matrix.VERSION, 'git')
- name: Build
working-directory: ${{ matrix.SUBFOLDER }}
run: cargo build --target=${{ matrix.TARGET }} --examples --release
ci-rpi:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta]
SUBFOLDER:
- raspberrypi
TARGET:
- armv7-unknown-linux-gnueabihf
VERSION:
- released
# - git # Deactivated building git version until everything (drivers, hals) are migrated to embedded-hal 1.0
steps:
- uses: actions/checkout@v4
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.OS }}-cargo-
- name: Cache build output dependencies
uses: actions/cache@v2
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.OS }}-build-
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.TARGET }}
- run: cargo install cross
- name: Checkout CI scripts
uses: actions/checkout@v4
with:
repository: 'eldruin/rust-driver-ci-scripts'
ref: 'master'
path: 'ci'
- run: ../ci/patch-git-drivers.sh
working-directory: ${{ matrix.SUBFOLDER }}
if: contains(matrix.VERSION, 'git')
- name: Build
working-directory: ${{ matrix.SUBFOLDER }}
run: cross build --target=${{ matrix.TARGET }} --examples