9
9
ci :
10
10
name : CI
11
11
runs-on : ubuntu-latest
12
- needs : [ci-linux]
13
- steps :
12
+ needs : [check, ci-linux, ci-serde ]
13
+ steps :
14
14
- name : Done
15
15
run : exit 0
16
+
17
+ check :
18
+ name : Cargo check
19
+ runs-on : ubuntu-latest
20
+ strategy :
21
+ matrix :
22
+ TARGET : [x86_64-unknown-linux-gnu, x86_64-apple-darwin, x86_64-pc-windows-msvc]
23
+
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+
27
+ - uses : actions-rs/toolchain@v1
28
+ with :
29
+ profile : minimal
30
+ toolchain : stable
31
+ override : true
32
+ target : ${{ matrix.TARGET }}
33
+
34
+ - name : Cache Dependencies
35
+ uses : Swatinem/rust-cache@v1
36
+ with :
37
+ key : ${{ matrix.TARGET }}
38
+
39
+ - uses : actions-rs/cargo@v1
40
+ with :
41
+ command : check
42
+ args : --target ${{ matrix.TARGET }}
43
+
44
+ prebuild :
45
+ name : Prebuild
46
+ runs-on : ubuntu-latest
47
+ strategy :
48
+ matrix :
49
+ rust : [stable, nightly, 1.46.0]
50
+
51
+ steps :
52
+ - uses : actions/checkout@v3
53
+
54
+ - uses : actions-rs/toolchain@v1
55
+ with :
56
+ profile : minimal
57
+ toolchain : ${{ matrix.rust }}
58
+ override : true
59
+
60
+ - name : Cache
61
+ uses : Swatinem/rust-cache@v1
62
+ with :
63
+ sharedKey : prebuilded-v0.22
64
+
65
+ - name : Self install
66
+ run : |
67
+ cargo install svd2rust --path .
68
+
16
69
ci-linux :
17
70
runs-on : ubuntu-latest
71
+ needs : [check, prebuild]
18
72
strategy :
19
- fail-fast : false
20
73
matrix :
21
74
# All generated code should be running on stable now
22
75
rust : [stable]
23
76
24
77
# All vendor files we want to test on stable
25
- vendor : [rustfmt, Atmel, Freescale, Fujitsu, Holtek, Microchip, Nordic, Nuvoton, NXP, RISC-V, SiliconLabs, Spansion, STMicro, Toshiba]
26
-
27
- # The default target we're compiling on and for
28
- TARGET : [x86_64-unknown-linux-gnu]
29
-
30
- # Temporary hack as long as we use the current CI script
31
- TRAVIS_OS_NAME : [linux]
32
-
33
- FEATURES : [""]
78
+ vendor : [Atmel, Freescale, Fujitsu, Holtek, Microchip, Nordic, Nuvoton, NXP, RISC-V, SiliconLabs, Spansion, STMicro, Toshiba]
34
79
35
80
# Options are all, none, strict and const
36
81
options : [all, none]
@@ -51,66 +96,55 @@ jobs:
51
96
# Test MSRV
52
97
- rust : 1.46.0
53
98
vendor : Nordic
54
- TARGET : x86_64-unknown-linux-gnu
55
- TRAVIS_OS_NAME : linux
56
99
57
100
# Use nightly for architectures which don't support stable
58
101
- rust : nightly
59
- experimental : true
60
102
vendor : OTHER
61
- TARGET : x86_64-unknown-linux-gnu
62
- TRAVIS_OS_NAME : linux
63
103
64
- # Use nightly for architectures which don't support stable
104
+ # Use nightly for architectures which don't support stable
65
105
- rust : nightly
66
- experimental : true
67
106
vendor : Espressif
68
- TARGET : x86_64-unknown-linux-gnu
69
- TRAVIS_OS_NAME : linux
70
-
71
- # OSX
72
- - rust : stable
73
- TARGET : x86_64-apple-darwin
74
- TRAVIS_OS_NAME : osx
75
-
76
- # Windows
77
- - rust : stable
78
- TARGET : x86_64-pc-windows-msvc
79
- TRAVIS_OS_NAME : windows
80
107
81
108
steps :
82
- - uses : actions/checkout@v2
109
+ - uses : actions/checkout@v3
110
+
83
111
- uses : actions-rs/toolchain@v1
84
112
with :
85
113
profile : minimal
86
114
toolchain : ${{ matrix.rust }}
87
- target : ${{ matrix.TARGET }}
88
115
override : true
89
- components : rustfmt
116
+
117
+ - name : Cache
118
+ uses : Swatinem/rust-cache@v1
119
+ with :
120
+ sharedKey : prebuilded-v0.22
121
+
90
122
- name : Run CI script for `${{ matrix.vendor }}` under rust `${{ matrix.rust }}` with options=`${{ matrix.options }}`
91
123
env :
92
- TARGET : ${{ matrix.TARGET }}
93
124
VENDOR : ${{ matrix.vendor }}
94
- FEATURES : ${{ matrix.FEATURES }}
95
125
OPTIONS : ${{ matrix.options }}
96
- TRAVIS_OS_NAME : ${{ matrix.TRAVIS_OS_NAME }}
97
126
run : bash ci/script.sh
127
+
98
128
ci-serde :
99
129
runs-on : ubuntu-latest
100
130
steps :
101
- - uses : actions/checkout@v2
131
+ - uses : actions/checkout@v3
132
+
102
133
- uses : actions-rs/toolchain@v1
103
134
with :
104
135
profile : minimal
105
136
toolchain : stable
106
137
override : true
107
- components : rustfmt
108
- - name : Install svdtools
109
- uses :
actions-rs/[email protected]
138
+
139
+ - name : Cache
140
+ uses : Swatinem/rust-cache@v1
110
141
with :
111
- crate : svdtools
112
- version : 0.2.0
113
- use-tool-cache : true
142
+ key : svdtools-0.2.1
143
+
144
+ - name : Install svdtools
145
+ run : |
146
+ cargo install svdtools --version 0.2.1 --target-dir target
147
+
114
148
- name : Run CI script
115
149
run : |
116
150
wget https://stm32-rs.github.io/stm32-rs/stm32f411.svd.patched
0 commit comments