Skip to content

Commit b1fc55e

Browse files
committed
Merge the dep-tests job with the build job
1 parent 9da9277 commit b1fc55e

File tree

1 file changed

+39
-55
lines changed

1 file changed

+39
-55
lines changed

.github/workflows/ci.yml

Lines changed: 39 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,40 @@ 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
10267
os: windows-latest
10368
- toolchain: 1.38.0-x86_64-pc-windows-gnu
69+
features: --no-default-features
10470
os: windows-latest
10571
- toolchain: 1.38.0-x86_64-apple-darwin
72+
features: --all-features
10673
os: macOS-latest
10774
- toolchain: 1.38.0-x86_64-unknown-linux-gnu
75+
features: --all-features
10876
os: ubuntu-18.04
10977
- toolchain: stable-x86_64-pc-windows-msvc
78+
features: --no-default-features
11079
os: windows-latest
11180
- toolchain: stable-x86_64-pc-windows-gnu
81+
features: --no-default-features
11282
os: windows-latest
11383
- toolchain: stable-x86_64-apple-darwin
84+
features: --all-features
11485
os: macOS-latest
11586
- toolchain: stable-x86_64-unknown-linux-gnu
87+
features: --all-features
11688
os: ubuntu-18.04
11789
- toolchain: beta-x86_64-pc-windows-msvc
90+
features: --no-default-features
11891
os: windows-latest
11992
- toolchain: beta-x86_64-pc-windows-gnu
93+
features: --no-default-features
12094
os: windows-latest
12195
- toolchain: beta-x86_64-apple-darwin
96+
features: --all-features
12297
os: macOS-latest
12398
- toolchain: beta-x86_64-unknown-linux-gnu
99+
features: --all-features
124100
os: ubuntu-18.04
125101

126102
name: ${{ matrix.toolchain }}
@@ -141,30 +117,38 @@ jobs:
141117
override: true
142118
profile: default
143119

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`'
120+
- name: '`cargo clippy ${{ matrix.features }} -- -D warnings`'
155121
uses: actions-rs/cargo@v1
156122
with:
157123
command: clippy
158-
args: ${{ steps.features.outputs.features }} -- -D warnings
124+
args: ${{ matrix.features }} -- -D warnings
159125

160-
- name: '`cargo test`'
126+
- name: '`cargo test ${{ matrix.features }} --no-fail-fast`'
161127
uses: actions-rs/cargo@v1
162128
with:
163129
command: test
164-
args: ${{ steps.features.outputs.features }} --no-fail-fast
130+
args: ${{ matrix.features }} --no-fail-fast
165131

166132
- name: '`cargo run --release`'
167133
uses: actions-rs/cargo@v1
168134
with:
169135
command: run
170-
args: ${{ steps.features.outputs.features }} --release
136+
args: ${{ matrix.features }} --release
137+
138+
- name: '`cargo clippy ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml -- -D warnings`'
139+
uses: actions-rs/cargo@v1
140+
with:
141+
command: clippy
142+
args: ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml -- -D warnings
143+
144+
- name: '`cargo test ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml --no-fail-fast`'
145+
uses: actions-rs/cargo@v1
146+
with:
147+
command: test
148+
args: ${{ matrix.features }} --manifest-path ./dep-tests/Cargo.toml --no-fail-fast
149+
150+
- name: '`cargo dep-tests --all-features -d 1`'
151+
uses: actions-rs/cargo@v1
152+
with:
153+
command: dep-tests
154+
args: --all-features -d 1

0 commit comments

Comments
 (0)