Skip to content

Commit 2a50938

Browse files
committed
Merge the dep-tests job with the build jobs
1 parent f243253 commit 2a50938

File tree

1 file changed

+54
-55
lines changed

1 file changed

+54
-55
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -35,56 +35,20 @@ jobs:
3535
uses: actions-rs/cargo@v1
3636
with:
3737
command: fmt
38-
args: --all -- --check
38+
args: -- --check
3939

40-
dep-tests:
41-
strategy:
42-
fail-fast: false
43-
44-
name: dep-tests
45-
runs-on: ubuntu-18.04
46-
47-
steps:
48-
- name: Checkout
49-
uses: actions/checkout@v1
50-
51-
- name: rust-toolchain
52-
uses: actions-rs/toolchain@v1
53-
with:
54-
toolchain: 1.38.0-x86_64-unknown-linux-gnu
55-
override: true
56-
profile: default
57-
58-
- name: '`cargo fmt --all --manifest-path ./dep-tests/Cargo.toml -- --check`'
40+
- name: '`cargo fmt --manifest-path ./dep-tests/Cargo.toml -- --check`'
5941
uses: actions-rs/cargo@v1
6042
with:
6143
command: fmt
62-
args: --all --manifest-path ./dep-tests/Cargo.toml -- --check
63-
64-
- name: '`cargo clippy --manifest-path ./dep-tests/Cargo.toml -- -D warnings`'
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: clippy
68-
args: --manifest-path ./dep-tests/Cargo.toml -- -D warnings
69-
70-
- name: '`cargo test --no-fail-fast --manifest-path ./dep-tests/Cargo.toml`'
71-
uses: actions-rs/cargo@v1
72-
with:
73-
command: test
74-
args: --no-fail-fast --manifest-path ./dep-tests/Cargo.toml
75-
76-
- name: '`cargo dep-tests --all-features -d 1`'
77-
uses: actions-rs/cargo@v1
78-
with:
79-
command: dep-tests
80-
args: --all-features -d 1
44+
args: --manifest-path ./dep-tests/Cargo.toml -- --check
8145

8246
build:
8347
strategy:
8448
fail-fast: false
8549
matrix:
8650
toolchain:
87-
# `x86_64-pc-windows-msvc` is tier 1 **for now**.
51+
# `x86_64-pc-windows-gnu` is tier 1 **for now**.
8852
- 1.38.0-x86_64-pc-windows-msvc
8953
- 1.38.0-x86_64-pc-windows-gnu
9054
- 1.38.0-x86_64-apple-darwin
@@ -99,28 +63,52 @@ jobs:
9963
- beta-x86_64-unknown-linux-gnu
10064
include:
10165
- toolchain: 1.38.0-x86_64-pc-windows-msvc
66+
features: --no-default-features
67+
dep_tests: true
10268
os: windows-latest
10369
- toolchain: 1.38.0-x86_64-pc-windows-gnu
70+
features: --no-default-features
71+
dep_tests: false
10472
os: windows-latest
10573
- toolchain: 1.38.0-x86_64-apple-darwin
74+
features: --all-features
75+
dep_tests: true
10676
os: macOS-latest
10777
- toolchain: 1.38.0-x86_64-unknown-linux-gnu
78+
features: --all-features
79+
dep_tests: true
10880
os: ubuntu-18.04
10981
- toolchain: stable-x86_64-pc-windows-msvc
82+
features: --no-default-features
83+
dep_tests: true
11084
os: windows-latest
11185
- toolchain: stable-x86_64-pc-windows-gnu
86+
features: --no-default-features
87+
dep_tests: false
11288
os: windows-latest
11389
- toolchain: stable-x86_64-apple-darwin
90+
features: --all-features
91+
dep_tests: true
11492
os: macOS-latest
11593
- toolchain: stable-x86_64-unknown-linux-gnu
94+
features: --all-features
95+
dep_tests: true
11696
os: ubuntu-18.04
11797
- toolchain: beta-x86_64-pc-windows-msvc
98+
features: --no-default-features
99+
dep_tests: true
118100
os: windows-latest
119101
- toolchain: beta-x86_64-pc-windows-gnu
102+
features: --no-default-features
103+
dep_tests: false
120104
os: windows-latest
121105
- toolchain: beta-x86_64-apple-darwin
106+
features: --all-features
107+
dep_tests: true
122108
os: macOS-latest
123109
- toolchain: beta-x86_64-unknown-linux-gnu
110+
features: --all-features
111+
dep_tests: true
124112
os: ubuntu-18.04
125113

126114
name: ${{ matrix.toolchain }}
@@ -141,30 +129,41 @@ jobs:
141129
override: true
142130
profile: default
143131

144-
- name: Determine features
145-
id: features
146-
run: |
147-
if ${{ matrix.os == 'windows-latest' }}; then
148-
echo '::set-output name=features::--no-default-features'
149-
else
150-
echo '::set-output name=features::--all-features'
151-
fi
152-
shell: bash
153-
154-
- name: '`cargo clippy`'
132+
- name: '`cargo clippy ${{ matrix.features }} -- -D warnings`'
155133
uses: actions-rs/cargo@v1
156134
with:
157135
command: clippy
158-
args: ${{ steps.features.outputs.features }} -- -D warnings
136+
args: ${{ matrix.features }} -- -D warnings
159137

160-
- name: '`cargo test`'
138+
- name: '`cargo test ${{ matrix.features }} --no-fail-fast`'
161139
uses: actions-rs/cargo@v1
162140
with:
163141
command: test
164-
args: ${{ steps.features.outputs.features }} --no-fail-fast
142+
args: ${{ matrix.features }} --no-fail-fast
165143

166144
- name: '`cargo run --release`'
167145
uses: actions-rs/cargo@v1
168146
with:
169147
command: run
170-
args: ${{ steps.features.outputs.features }} --release
148+
args: ${{ matrix.features }} --release
149+
150+
- name: '`cargo clippy ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml -- -D warnings`'
151+
uses: actions-rs/cargo@v1
152+
with:
153+
command: clippy
154+
args: ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml -- -D warnings
155+
if: matrix.dep_tests
156+
157+
- name: '`cargo test ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml --no-fail-fast`'
158+
uses: actions-rs/cargo@v1
159+
with:
160+
command: test
161+
args: ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml --no-fail-fast
162+
if: matrix.dep_tests
163+
164+
- name: '`cargo dep-tests --all-features -d 1`'
165+
uses: actions-rs/cargo@v1
166+
with:
167+
command: dep-tests
168+
args: --all-features -d 1
169+
if: matrix.dep_tests

0 commit comments

Comments
 (0)