|
7 | 7 | workflow_dispatch:
|
8 | 8 | merge_group:
|
9 | 9 | types: [checks_requested]
|
10 |
| - |
| 10 | + |
11 | 11 | jobs:
|
12 |
| - linux-ci: |
13 |
| - name: Linux |
14 |
| - runs-on: ubuntu-latest |
| 12 | + test: |
| 13 | + name: ${{ format('{0} {1}', matrix.platform.target, matrix.features)}} |
| 14 | + runs-on: ${{ matrix.platform.os }} |
| 15 | + env: |
| 16 | + RUST_BACKTRACE: 1 |
15 | 17 | strategy:
|
16 | 18 | matrix:
|
17 |
| - features: ["", "force-inprocess", "memfd", "async"] |
| 19 | + platform: |
| 20 | + - { target: aarch64-apple-darwin, os: macos-14 } |
| 21 | + - { target: x86_64-apple-darwin, os: macos-13 } |
| 22 | + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } |
| 23 | + - { target: x86_64-pc-windows-msvc, os: windows-latest } |
| 24 | + - { target: i686-pc-windows-msvc, os: windows-latest } |
| 25 | + features: ["", "force-inprocess", "async"] |
| 26 | + include: |
| 27 | + - features: "windows-shared-memory-equality" |
| 28 | + platform: { target: x86_64-pc-windows-msvc, os: windows-latest } |
| 29 | + - features: "windows-shared-memory-equality" |
| 30 | + platform: { target: i686-pc-windows-msvc, os: windows-latest } |
| 31 | + - features: "memfd" |
| 32 | + platform: { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } |
18 | 33 | steps:
|
19 |
| - - uses: actions/checkout@v3 |
| 34 | + - uses: actions/checkout@v4 |
20 | 35 |
|
21 |
| - - name: Install nightly toolchain |
22 |
| - uses: dtolnay/rust-toolchain@nightly |
| 36 | + - name: Install stable toolchain |
| 37 | + uses: dtolnay/rust-toolchain@stable |
23 | 38 | with:
|
24 | 39 | components: rustfmt, clippy
|
25 | 40 |
|
26 | 41 | - name: rustfmt
|
27 | 42 | run: cargo fmt --check
|
28 | 43 |
|
29 | 44 | - name: clippy
|
30 |
| - run: cargo clippy --features "${{ matrix.features }}" |
31 |
| - |
32 |
| - - name: Cargo build |
33 |
| - run: cargo build --features "${{ matrix.features }}" |
34 |
| - |
35 |
| - - name: Cargo test |
36 |
| - run: cargo test --features "${{ matrix.features }}" |
37 |
| - env: |
38 |
| - RUST_BACKTRACE: 1 |
39 |
| - |
40 |
| - mac-ci: |
41 |
| - name: macOS |
42 |
| - runs-on: macos-latest |
43 |
| - strategy: |
44 |
| - matrix: |
45 |
| - features: ["", "force-inprocess", "async"] |
46 |
| - |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v3 |
49 |
| - |
50 |
| - - name: Install nightly toolchain |
51 |
| - uses: dtolnay/rust-toolchain@nightly |
52 |
| - |
53 |
| - - name: Cargo build |
54 |
| - run: cargo build --features "${{ matrix.features }}" |
| 45 | + run: cargo clippy --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
55 | 46 |
|
56 | 47 | - name: Cargo test
|
57 |
| - run: cargo test --features "${{ matrix.features }}" |
58 |
| - env: |
59 |
| - RUST_BACKTRACE: 1 |
60 |
| - |
61 |
| - windows-ci: |
62 |
| - name: Windows |
63 |
| - runs-on: windows-latest |
64 |
| - strategy: |
65 |
| - matrix: |
66 |
| - features: ["", "--features force-inprocess", "--features windows-shared-memory-equality", "--features async"] |
67 |
| - target: ["x86_64-pc-windows-msvc", "i686-pc-windows-msvc"] |
68 |
| - |
69 |
| - steps: |
70 |
| - - uses: actions/checkout@v3 |
71 |
| - |
72 |
| - - name: Install nightly toolchain |
73 |
| - uses: dtolnay/rust-toolchain@nightly |
74 |
| - with: |
75 |
| - targets: ${{ matrix.target }} |
| 48 | + run: cargo test --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
76 | 49 |
|
77 |
| - - name: Cargo build |
78 |
| - run: cargo build ${{ matrix.features }} --target ${{ matrix.target }} |
79 |
| - |
80 |
| - - name: Cargo test |
81 |
| - run: cargo test ${{ matrix.features }} --target ${{ matrix.target }} |
82 |
| - env: |
83 |
| - RUST_BACKTRACE: 1 |
| 50 | + - name: Cargo test benches |
| 51 | + run: cargo test --benches --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
84 | 52 |
|
85 | 53 | build_result:
|
86 | 54 | name: Result
|
87 | 55 | runs-on: ubuntu-latest
|
88 | 56 | if: always()
|
89 | 57 | needs:
|
90 |
| - - "linux-ci" |
91 |
| - - "mac-ci" |
92 |
| - - "windows-ci" |
| 58 | + - "test" |
93 | 59 |
|
94 | 60 | steps:
|
95 | 61 | - name: Success
|
|
98 | 64 | - name: Failure
|
99 | 65 | run: exit 1
|
100 | 66 | if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
101 |
| - |
0 commit comments