@@ -4,13 +4,14 @@ name: CI
44
55jobs :
66 rustfmt :
7- name : Rustfmt
7+ name : " Rustfmt (${{ matrix.crate && matrix.crate || 'base' }}) "
88 runs-on : ${{ matrix.config.os }}
99 strategy :
1010 fail-fast : true
1111 matrix :
1212 config :
1313 - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
14+ crate : [null, "derive"]
1415 steps :
1516 - uses : actions/checkout@v2
1617 - uses : actions-rs/toolchain@v1
@@ -24,13 +25,14 @@ jobs:
2425 args : --check
2526
2627 clippy :
27- name : Clippy
28+ name : " Clippy (${{ matrix.crate && matrix.crate || 'base' }}) "
2829 runs-on : ${{ matrix.config.os }}
2930 strategy :
3031 fail-fast : false
3132 matrix :
3233 config :
3334 - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
35+ crate : [null, "derive"]
3436 steps :
3537 - uses : actions/checkout@v2
3638 - uses : actions-rs/toolchain@v1
4143 - uses : actions-rs/cargo@v1
4244 with :
4345 command : clippy
46+ args : ${{ matrix.crate && format(' --manifest-path {0}/Cargo.toml', matrix.crate) }}
4447
4548 test_all :
4649 name : TestAll
7376 config :
7477 - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
7578 - { os: macos-latest, target: 'x86_64-apple-darwin' }
76- backends : ["syn", ""]
79+ backend : ["syn", ""]
7780
7881 steps :
7982 - uses : actions/checkout@v2
@@ -85,17 +88,24 @@ jobs:
8588 - uses : actions-rs/cargo@v1
8689 with :
8790 command : test
88- args : --features "debug_asserts, rustc_hash, generated_setters, debug_diffs, serde, nanoserde, ${{ matrix.backends.target }}"
91+ args : --features "debug_asserts, rustc_hash, generated_setters, debug_diffs, serde, nanoserde, ${{ matrix.backend }}"
8992
90- test_serde :
91- name : TestSerde
93+ test_feature_matrix :
94+ name : TestFeatures
9295 runs-on : ${{ matrix.config.os }}
9396 strategy :
9497 fail-fast : false
9598 matrix :
9699 config :
97100 - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
98101 - { os: macos-latest, target: 'x86_64-apple-darwin' }
102+ backend : ["syn", null]
103+ serde : ["nanoserde", "serde", null]
104+ debug_asserts : ["debug_asserts", null]
105+ debug_diffs : ["debug_diffs", null]
106+ hash : ['rustc_hash', null]
107+ generated_setters : ["generated_setters", null]
108+
99109
100110 steps :
101111 - uses : actions/checkout@v2
@@ -107,7 +117,7 @@ jobs:
107117 - uses : actions-rs/cargo@v1
108118 with :
109119 command : test
110- args : --features serde
120+ args : ${{ format(' --features "{0}"', join(fromJSON(format('["{0}","{1}","{2}","{3}","{4}","{5}"]', matrix.backend || '', matrix. serde || '', matrix.debug_asserts || '', matrix.debug_diffs || '', matrix.hash || '', matrix.generated_setters || '')), ',')) }}
111121
112122 test_setters :
113123 name : TestSetters
0 commit comments