@@ -2,34 +2,38 @@ name: Rust CI
2
2
3
3
on :
4
4
push :
5
- branches : [ master, github-actions ]
5
+ branches : [master, github-actions]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [master]
8
8
9
9
jobs :
10
10
build :
11
-
12
11
runs-on : ubuntu-latest
13
12
14
13
strategy :
15
14
matrix :
16
15
rust : ["1.34.2", stable, beta, nightly]
17
16
features : ["", "rayon"]
18
17
command : [test, benchmark]
18
+
19
19
steps :
20
- - uses : actions/checkout@v2
21
- - run : rustup default ${{ matrix.rust }}
22
- - name : build
23
- run : >
24
- cargo build --verbose --no-default-features --features "$FEATURES"
25
- - name : test
26
- run : >
27
- cargo test --tests --benches --no-default-features --features "$FEATURES"
28
- if : ${{ matrix.command == 'test' && matrix.rust != '1.34.2' }}
29
- env :
30
- FEATURES : ${{ matrix.features }}
31
- - name : benchmark
32
- run : cargo bench --bench decoding_benchmark --no-default-features --features "$FEATURES" -- --warm-up-time 1 --measurement-time 1 --sample-size 25
33
- if : ${{ matrix.command == 'benchmark' && matrix.rust != '1.34.2' }}
34
- env :
35
- FEATURES : ${{ matrix.features }}
20
+ - name : Installing Rust toolchain
21
+ uses : actions-rs/toolchain@v1
22
+ with :
23
+ override : true
24
+ toolchain : ${{ matrix.rust }}
25
+ - uses : actions/checkout@v2
26
+ - name : build
27
+ run : >
28
+ cargo build --verbose --no-default-features --features "$FEATURES"
29
+ - name : test
30
+ run : >
31
+ cargo test --tests --benches --no-default-features --features "$FEATURES"
32
+ if : ${{ matrix.command == 'test' && matrix.rust != '1.34.2' }}
33
+ env :
34
+ FEATURES : ${{ matrix.features }}
35
+ - name : benchmark
36
+ run : cargo bench --bench decoding_benchmark --no-default-features --features "$FEATURES" -- --warm-up-time 1 --measurement-time 1 --sample-size 25
37
+ if : ${{ matrix.command == 'benchmark' && matrix.rust != '1.34.2' }}
38
+ env :
39
+ FEATURES : ${{ matrix.features }}
0 commit comments