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@v2
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@v2
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
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_1, Freescale_2, Fujitsu_1, Fujitsu_2, 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]
37
82
exclude :
38
- - vendor : Fujitsu
83
+ - vendor : Fujitsu_1
84
+ options : all
85
+ - vendor : Fujitsu_2
39
86
options : all
40
87
- vendor : Spansion
41
88
options : all
@@ -47,66 +94,55 @@ jobs:
47
94
# Test MSRV
48
95
- rust : 1.46.0
49
96
vendor : Nordic
50
- TARGET : x86_64-unknown-linux-gnu
51
- TRAVIS_OS_NAME : linux
52
97
53
98
# Use nightly for architectures which don't support stable
54
99
- rust : nightly
55
- experimental : true
56
100
vendor : OTHER
57
- TARGET : x86_64-unknown-linux-gnu
58
- TRAVIS_OS_NAME : linux
59
101
60
- # Use nightly for architectures which don't support stable
102
+ # Use nightly for architectures which don't support stable
61
103
- rust : nightly
62
- experimental : true
63
104
vendor : Espressif
64
- TARGET : x86_64-unknown-linux-gnu
65
- TRAVIS_OS_NAME : linux
66
-
67
- # OSX
68
- - rust : stable
69
- TARGET : x86_64-apple-darwin
70
- TRAVIS_OS_NAME : osx
71
-
72
- # Windows
73
- - rust : stable
74
- TARGET : x86_64-pc-windows-msvc
75
- TRAVIS_OS_NAME : windows
76
105
77
106
steps :
78
107
- uses : actions/checkout@v2
108
+
79
109
- uses : actions-rs/toolchain@v1
80
110
with :
81
111
profile : minimal
82
112
toolchain : ${{ matrix.rust }}
83
- target : ${{ matrix.TARGET }}
84
113
override : true
85
- components : rustfmt
114
+
115
+ - name : Cache
116
+ uses : Swatinem/rust-cache@v1
117
+ with :
118
+ sharedKey : prebuilded
119
+
86
120
- name : Run CI script for `${{ matrix.vendor }}` under rust `${{ matrix.rust }}` with options=`${{ matrix.options }}`
87
121
env :
88
- TARGET : ${{ matrix.TARGET }}
89
122
VENDOR : ${{ matrix.vendor }}
90
- FEATURES : ${{ matrix.FEATURES }}
91
123
OPTIONS : ${{ matrix.options }}
92
- TRAVIS_OS_NAME : ${{ matrix.TRAVIS_OS_NAME }}
93
124
run : bash ci/script.sh
125
+
94
126
ci-serde :
95
127
runs-on : ubuntu-latest
96
128
steps :
97
129
- uses : actions/checkout@v2
130
+
98
131
- uses : actions-rs/toolchain@v1
99
132
with :
100
133
profile : minimal
101
134
toolchain : stable
102
135
override : true
103
- components : rustfmt
104
- - name : Install svdtools
105
- uses : actions-rs/install@v0.1
136
+
137
+ - name : Cache
138
+ uses : Swatinem/rust-cache@v1
106
139
with :
107
- crate : svdtools
108
- version : 0.2.0
109
- use-tool-cache : true
140
+ key : svdtools-0.2.0
141
+
142
+ - name : Install svdtools
143
+ run : |
144
+ cargo install svdtools --version 0.2.0 --target-dir target
145
+
110
146
- name : Run CI script
111
147
run : |
112
148
wget https://stm32-rs.github.io/stm32-rs/stm32f411.svd.patched
0 commit comments