Skip to content

Commit 6f3b6fb

Browse files
committed
Fixed Workflow pipeline
1 parent f5c401a commit 6f3b6fb

1 file changed

Lines changed: 24 additions & 16 deletions

File tree

.github/workflows/rust.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,34 @@ env:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
steps:
1817
- uses: actions/checkout@v4
19-
20-
- name: Build
21-
run: cargo build --verbose
22-
23-
- name: Build Release
24-
run: cargo build --release --verbose
25-
26-
- name: Run tests
27-
run: cargo test --verbose
28-
29-
- name: Cache
18+
19+
# Caching deps before build
20+
- name: Cache Cargo dependencies
3021
uses: actions/cache@v4
3122
with:
3223
path: |
33-
~/.cargo/registry
34-
~/.cargo/git
35-
target
36-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
24+
~/.cargo/registry
25+
~/.cargo/git
26+
target
27+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-cargo-
30+
31+
- name: Install Rust toolchain
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: stable
35+
override: true
36+
37+
- name: Build (Debug)
38+
run: cargo build --verbose
39+
40+
- name: Build (Release)
41+
run: cargo build --release --verbose
42+
43+
- name: Run Tests
44+
run: cargo test --verbose

0 commit comments

Comments
 (0)