@@ -7,42 +7,36 @@ name: Build
77
88env :
99 RUSTFLAGS : ' --deny warnings'
10+ MSRV : 1.76
1011
1112jobs :
1213 build-std :
1314 runs-on : ubuntu-latest
1415 strategy :
1516 matrix :
16- rust : [stable ]
17- FEATURES : ['', 'from_str', 'std', 'serde ']
17+ FEATURES : ['', 'from_str', 'std', 'serde', 'regex' ]
18+ TARGET : ['x86_64-unknown-linux-gnu ']
1819
1920 include :
2021 # Test nightly but don't fail
2122 - rust : nightly
2223 experimental : true
2324
2425 steps :
25- - uses : actions/checkout@v2
26- - uses : actions-rs/ toolchain@v1
26+ - uses : actions/checkout@v4
27+ - uses : dtolnay/rust- toolchain@stable
2728 with :
28- profile : minimal
29- toolchain : ${{ matrix.rust }}
29+ toolchain : ${{ env.MSRV }}
3030 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 }}
4035
4136 build-no-std :
4237 runs-on : ubuntu-latest
4338 strategy :
4439 matrix :
45- rust : [stable]
4640 TARGET : [thumbv6m-none-eabi, thumbv7m-none-eabi]
4741
4842 include :
@@ -52,47 +46,37 @@ jobs:
5246 TARGET : x86_64-unknown-linux-gnu
5347
5448 steps :
55- - uses : actions/checkout@v2
56- - uses : actions-rs/ toolchain@v1
49+ - uses : actions/checkout@v4
50+ - uses : dtolnay/rust- toolchain@stable
5751 with :
58- profile : minimal
59- toolchain : ${{ matrix.rust }}
52+ toolchain : ${{ env.MSRV }}
6053 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 }}
6656
6757 fmt :
6858 runs-on : ubuntu-latest
6959 steps :
70- - uses : actions/checkout@v2
71- - uses : actions-rs/ toolchain@v1
60+ - uses : actions/checkout@v4
61+ - uses : dtolnay/rust- toolchain@stable
7262 with :
73- profile : minimal
74- toolchain : stable
75- override : true
63+ toolchain : ${{ env.MSRV }}
64+ target : ${{ matrix.TARGET }}
7665 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
8168
8269 clippy :
8370 runs-on : ubuntu-latest
8471 strategy :
8572 matrix :
86- FEATURES : ['', 'from_str', 'std']
73+ FEATURES : ['', 'from_str', 'std', 'serde', 'regex' ]
8774 steps :
88- - uses : actions/checkout@v2
89- - uses : actions-rs/ toolchain@v1
75+ - uses : actions/checkout@v4
76+ - uses : dtolnay/rust- toolchain@stable
9077 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 }}
9480 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