|
9 | 9 | name: Continuous integration
|
10 | 10 |
|
11 | 11 | jobs:
|
12 |
| - # None |
13 |
| - test-features-none: |
14 |
| - name: "Test Suite [Features: None]" |
15 |
| - runs-on: ubuntu-latest |
16 |
| - steps: |
17 |
| - - uses: actions/checkout@v3 |
18 |
| - - uses: dtolnay/rust-toolchain@stable |
19 |
| - - uses: Leafwing-Studios/cargo-cache@v1 |
20 |
| - - run: cargo build --no-default-features |
21 |
| - - run: cargo test --no-default-features |
22 |
| - |
23 |
| - # Default |
24 | 12 | test-features-default:
|
25 | 13 | name: "Test Suite [Features: Default]"
|
26 | 14 | runs-on: ubuntu-latest
|
27 | 15 | steps:
|
28 | 16 | - uses: actions/checkout@v3
|
29 | 17 | - uses: dtolnay/rust-toolchain@stable
|
30 |
| - - run: cargo build |
31 |
| - - run: cargo test |
32 |
| - |
33 |
| - test-features-default-with-serde: |
34 |
| - name: "Test Suite [Features: Default + serde]" |
35 |
| - runs-on: ubuntu-latest |
36 |
| - steps: |
37 |
| - - uses: actions/checkout@v3 |
38 |
| - - uses: dtolnay/rust-toolchain@stable |
39 |
| - - run: cargo build --features serde |
40 |
| - - run: cargo test --features serde |
41 |
| - |
42 |
| - test-features-no-grid-nor-flexbox: |
43 |
| - name: "Test Suite [Features: std (no grid or flexbox)]" |
44 |
| - runs-on: ubuntu-latest |
45 |
| - steps: |
46 |
| - - uses: actions/checkout@v3 |
47 |
| - - uses: dtolnay/rust-toolchain@stable |
48 |
| - - run: cargo build --no-default-features --features std |
49 |
| - - run: cargo test --no-default-features --features std |
50 |
| - |
51 |
| - # Flexbox |
52 |
| - test-features-flexbox: |
53 |
| - name: "Test Suite [Features: flexbox + std]" |
54 |
| - runs-on: ubuntu-latest |
55 |
| - steps: |
56 |
| - - uses: actions/checkout@v3 |
57 |
| - - uses: dtolnay/rust-toolchain@stable |
58 |
| - - run: cargo build --no-default-features --features flexbox,std |
59 |
| - - run: cargo test --no-default-features --features flexbox,std |
60 |
| - |
61 |
| - # Grid |
62 |
| - test-features-grid: |
63 |
| - name: "Test Suite [Features: grid + std]" |
64 |
| - runs-on: ubuntu-latest |
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v3 |
67 |
| - - uses: dtolnay/rust-toolchain@stable |
68 |
| - - run: cargo build --no-default-features --features grid,std |
69 |
| - - run: cargo test --no-default-features --features grid,std |
| 18 | + - uses: Leafwing-Studios/cargo-cache@v1 |
| 19 | + - run: | |
| 20 | + cargo build |
| 21 | + cargo test |
70 | 22 |
|
71 |
| - test-features-grid-with-alloc: |
72 |
| - name: "Test Suite [Features: grid + alloc]" |
| 23 | + test-features-no-default: |
| 24 | + name: "Test Suite [Features: None]" |
73 | 25 | runs-on: ubuntu-latest
|
74 | 26 | steps:
|
75 | 27 | - uses: actions/checkout@v3
|
76 | 28 | - uses: dtolnay/rust-toolchain@stable
|
77 |
| - - run: cargo build --no-default-features --features alloc,grid |
78 |
| - - run: cargo test --no-default-features --features alloc,grid |
79 |
| - |
80 |
| - test-features-alloc: |
81 |
| - name: "Test Suite [Features: alloc]" |
| 29 | + - uses: Leafwing-Studios/cargo-cache@v1 |
| 30 | + - run: | |
| 31 | + cargo build --no-default-features |
| 32 | + cargo test --no-default-features |
| 33 | + |
| 34 | + # This tests all enabled default features with each of the optional features on top. |
| 35 | + test-features-with-default: |
82 | 36 | runs-on: ubuntu-latest
|
| 37 | + strategy: |
| 38 | + matrix: |
| 39 | + feature: [serde, random] |
83 | 40 | steps:
|
84 | 41 | - uses: actions/checkout@v3
|
85 | 42 | - uses: dtolnay/rust-toolchain@stable
|
86 |
| - - run: cargo build --no-default-features --features alloc |
87 |
| - - run: cargo test --no-default-features --features alloc |
88 |
| - |
89 |
| - test-features-default-no-grid: |
90 |
| - name: "Test Suite [Features: std (no grid)]" |
| 43 | + - uses: Leafwing-Studios/cargo-cache@v1 |
| 44 | + - run: | |
| 45 | + cargo build --features ${{ matrix.feature }} |
| 46 | + cargo test --features ${{ matrix.feature }} |
| 47 | + |
| 48 | + # This test all layout features with each of the optional features in isolation. |
| 49 | + test-features-without-default: |
91 | 50 | runs-on: ubuntu-latest
|
| 51 | + strategy: |
| 52 | + matrix: |
| 53 | + layout: [flexbox, grid, none] |
| 54 | + allocation: [std, alloc] |
| 55 | + feature: [serde, random, none] |
92 | 56 | steps:
|
93 | 57 | - uses: actions/checkout@v3
|
94 | 58 | - uses: dtolnay/rust-toolchain@stable
|
95 | 59 | - uses: Leafwing-Studios/cargo-cache@v1
|
96 |
| - - run: cargo build --no-default-features --features std |
97 |
| - - run: cargo test --no-default-features --features std |
| 60 | + - if: ${{ matrix.layout != 'none' && matrix.feature == 'none' }} |
| 61 | + run: | |
| 62 | + cargo build --no-default-features --features ${{ matrix.allocation }},${{ matrix.layout }} |
| 63 | + cargo test --no-default-features --features ${{ matrix.allocation }},${{ matrix.layout }} |
| 64 | + - if: ${{ matrix.layout == 'none' && matrix.feature != 'none' }} |
| 65 | + run: | |
| 66 | + cargo build --no-default-features --features ${{ matrix.allocation }},${{ matrix.feature }} |
| 67 | + cargo test --no-default-features --features ${{ matrix.allocation }},${{ matrix.feature }} |
| 68 | + - if: ${{ matrix.layout != 'none' && matrix.feature != 'none' }} |
| 69 | + run: | |
| 70 | + cargo build --no-default-features --features ${{ matrix.allocation }},${{ matrix.layout }},${{ matrix.feature }} |
| 71 | + cargo test --no-default-features --features ${{ matrix.allocation }},${{ matrix.layout }},${{ matrix.feature }} |
98 | 72 |
|
99 | 73 | fmt:
|
100 | 74 | name: Rustfmt
|
|
0 commit comments