@@ -7,42 +7,36 @@ name: Build
7
7
8
8
env :
9
9
RUSTFLAGS : ' --deny warnings'
10
+ MSRV : 1.76
10
11
11
12
jobs :
12
13
build-std :
13
14
runs-on : ubuntu-latest
14
15
strategy :
15
16
matrix :
16
- rust : [stable ]
17
- FEATURES : ['', 'from_str', 'std', 'serde ']
17
+ FEATURES : ['', 'from_str', 'std', 'serde', 'regex' ]
18
+ TARGET : ['x86_64-unknown-linux-gnu ']
18
19
19
20
include :
20
21
# Test nightly but don't fail
21
22
- rust : nightly
22
23
experimental : true
23
24
24
25
steps :
25
- - uses : actions/checkout@v2
26
- - uses : actions-rs/ toolchain@v1
26
+ - uses : actions/checkout@v4
27
+ - uses : dtolnay/rust- toolchain@stable
27
28
with :
28
- profile : minimal
29
- toolchain : ${{ matrix.rust }}
29
+ toolchain : ${{ env.MSRV }}
30
30
target : ${{ matrix.TARGET }}
31
- override : true
32
- - uses : actions-rs/cargo@v1
33
- with :
34
- command : build
35
- args : --target=x86_64-unknown-linux-gnu --features=${{ matrix.FEATURES }}
36
- - uses : actions-rs/cargo@v1
37
- with :
38
- command : test
39
- args : --target=x86_64-unknown-linux-gnu --features=${{ matrix.FEATURES }}
31
+ - name : Build std
32
+ run : cargo build --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
33
+ - name : Test std
34
+ run : cargo test --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
40
35
41
36
build-no-std :
42
37
runs-on : ubuntu-latest
43
38
strategy :
44
39
matrix :
45
- rust : [stable]
46
40
TARGET : [thumbv6m-none-eabi, thumbv7m-none-eabi]
47
41
48
42
include :
@@ -52,47 +46,37 @@ jobs:
52
46
TARGET : x86_64-unknown-linux-gnu
53
47
54
48
steps :
55
- - uses : actions/checkout@v2
56
- - uses : actions-rs/ toolchain@v1
49
+ - uses : actions/checkout@v4
50
+ - uses : dtolnay/rust- toolchain@stable
57
51
with :
58
- profile : minimal
59
- toolchain : ${{ matrix.rust }}
52
+ toolchain : ${{ env.MSRV }}
60
53
target : ${{ matrix.TARGET }}
61
- override : true
62
- - uses : actions-rs/cargo@v1
63
- with :
64
- command : build
65
- args : --target=${{ matrix.TARGET }}
54
+ - name : Build std
55
+ run : cargo build --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
66
56
67
57
fmt :
68
58
runs-on : ubuntu-latest
69
59
steps :
70
- - uses : actions/checkout@v2
71
- - uses : actions-rs/ toolchain@v1
60
+ - uses : actions/checkout@v4
61
+ - uses : dtolnay/rust- toolchain@stable
72
62
with :
73
- profile : minimal
74
- toolchain : stable
75
- override : true
63
+ toolchain : ${{ env.MSRV }}
64
+ target : ${{ matrix.TARGET }}
76
65
components : rustfmt
77
- - uses : actions-rs/cargo@v1
78
- with :
79
- command : fmt
80
- args : --all -- --check
66
+ - name : Format
67
+ run : cargo fmt --all -- --check
81
68
82
69
clippy :
83
70
runs-on : ubuntu-latest
84
71
strategy :
85
72
matrix :
86
- FEATURES : ['', 'from_str', 'std']
73
+ FEATURES : ['', 'from_str', 'std', 'serde', 'regex' ]
87
74
steps :
88
- - uses : actions/checkout@v2
89
- - uses : actions-rs/ toolchain@v1
75
+ - uses : actions/checkout@v4
76
+ - uses : dtolnay/rust- toolchain@stable
90
77
with :
91
- profile : minimal
92
- toolchain : 1.76 # clippy is too much of a moving target at the moment
93
- override : true
78
+ toolchain : ${{ env.MSRV }}
79
+ target : ${{ matrix.TARGET }}
94
80
components : clippy
95
- - uses : actions-rs/clippy-check@v1
96
- with :
97
- token : ${{ secrets.GITHUB_TOKEN }}
98
- args : --features=${{ matrix.FEATURES }}
81
+ - name : Clippy
82
+ run : cargo clippy --features=${{ matrix.FEATURES }} -- -D warnings
0 commit comments