Skip to content

Commit fdbb0a8

Browse files
committed
Merge remote-tracking branch 'origin/master' into section-10_2
2 parents f73e772 + 0e89071 commit fdbb0a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2470
-52
lines changed

.github/workflows/rust.yml

Lines changed: 56 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77
types:
88
- opened
@@ -13,39 +13,66 @@ env:
1313

1414
jobs:
1515
lint:
16-
1716
runs-on: ubuntu-latest
1817

1918
steps:
20-
- uses: actions/checkout@v2
21-
22-
- name: Install rust-toolchain
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
profile: minimal
26-
components: rustfmt, clippy
27-
28-
- name: cargo fmt
29-
uses: actions-rs/cargo@v1
30-
with:
31-
command: fmt
32-
args: --all -- --check
33-
34-
- name: cargo clippy
35-
uses: actions-rs/cargo@v1
36-
env:
37-
RUSTFLAGS: -D warnings
38-
with:
39-
command: clippy
40-
args: --workspace --all-targets --all-features
19+
- uses: actions/checkout@v2
4120

42-
build:
21+
- name: Install rust-toolchain
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
components: rustfmt, clippy
26+
27+
- uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.cargo/registry
31+
~/.cargo/git
32+
target
33+
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-cargo-${{ github.job }}-
36+
${{ runner.os }}-cargo-
37+
38+
- name: cargo fmt
39+
uses: actions-rs/cargo@v1
40+
with:
41+
command: fmt
42+
args: --all -- --check
43+
44+
- name: cargo clippy
45+
uses: actions-rs/cargo@v1
46+
env:
47+
RUSTFLAGS: -D warnings
48+
with:
49+
command: clippy
50+
args: --workspace --all-targets --all-features
4351

52+
build:
4453
runs-on: ubuntu-latest
4554

4655
steps:
47-
- uses: actions/checkout@v2
48-
- name: Build (denying warnings)
49-
run: RUSTFLAGS='-D warnings' cargo build --all-targets --all-features --verbose
50-
- name: Run tests
51-
run: cargo test --verbose
56+
- uses: actions/checkout@v2
57+
58+
- name: Install rust-toolchain
59+
uses: actions-rs/toolchain@v1
60+
with:
61+
profile: minimal
62+
63+
- uses: actions/cache@v2
64+
with:
65+
path: |
66+
~/.cargo/registry
67+
~/.cargo/git
68+
target
69+
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}
70+
restore-keys: |
71+
${{ runner.os }}-cargo-${{ github.job }}-
72+
${{ runner.os }}-cargo-
73+
74+
- name: Build (denying warnings)
75+
run: RUSTFLAGS='-D warnings' cargo build --all-targets --all-features --verbose
76+
77+
- name: Run tests
78+
run: cargo test --verbose

0 commit comments

Comments
 (0)