Skip to content

Commit 85b9a1e

Browse files
committed
ci: try Swatinem cache, only rust test not rust check/build
1 parent a73dae8 commit 85b9a1e

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

.github/workflows/test_ci.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,36 +50,21 @@ jobs:
5050

5151
- uses: dtolnay/rust-toolchain@stable
5252

53-
### Cargo Cache for Build Artifacts ###
54-
- name: Cache cargo
55-
uses: actions/cache@v3
53+
- uses: Swatinem/rust-cache@v2
5654
with:
57-
path: |
58-
~/.cargo/registry
59-
~/.cargo/git
60-
target
61-
key: ${{ runner.os }}-${{matrix.name}}-cargo-${{ hashFiles('**/Cargo.lock') }}
55+
key: ${{matrix.name}}
6256

6357
- name: Install NASM
6458
uses: ./.github/actions/install-nasm
6559

66-
### Check Build ###
67-
- name: Check Build
68-
run: cargo check --all
69-
7060
### Test Code ###
7161
- name: Test Build
7262
run: cargo test --all
73-
env:
74-
RUSTFLAGS: -C target-cpu=${{matrix.TARGET_CPU}}
75-
76-
### Build the code ###
77-
- name: Build Release
78-
run: cargo build --all
7963
shell: bash
8064
env:
8165
RUSTFLAGS: -C target-cpu=${{matrix.TARGET_CPU}}
8266

67+
8368
test_win32:
8469
runs-on: windows-2019
8570
steps:
@@ -92,23 +77,17 @@ jobs:
9277
uses: ./.github/actions/install-nasm
9378

9479
### Cargo cache for Build artifacts ###
95-
- name: Cache cargo
96-
uses: actions/cache@v3
80+
- uses: Swatinem/rust-cache@v2
9781
with:
98-
path: |
99-
~/.cargo/registry
100-
~/.cargo/git
101-
target
102-
key: ${{ runner.os }}-windows-test-32-cargo-${{ hashFiles('**/Cargo.lock') }}
82+
key: ${{matrix.name}}
83+
10384
- name: Install latest 32bit target
10485
uses: dtolnay/rust-toolchain@stable
10586
with:
10687
#components: rustfmt, clippy
10788
target: i686-pc-windows-msvc
10889

109-
### check and test build ###
110-
- name: Check Build
111-
run: cargo check --all --target=i686-pc-windows-msvc
90+
### Test build ###
11291
- name: Test Build
11392
run: cargo test --all --release --target=i686-pc-windows-msvc
11493

.github/workflows/test_woa.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,14 @@ jobs:
2222
- name: Checkout code again with git, so git commands work.
2323
uses: actions/checkout@v4
2424

25-
2625
- name: Install NASM
2726
uses: ./.github/actions/install-nasm
2827

29-
- name: Check Build
30-
run: & "Launch-VsDevShell.ps1" | cargo check --all
31-
3228
- name: Test Build
33-
run: & "Launch-VsDevShell.ps1" | cargo test --all
29+
run: "& Launch-VsDevShell.ps1" | cargo test --all"
3430
env:
3531
RUSTFLAGS: -C target-cpu=generic
3632

37-
- name: Build Release
38-
run: & "Launch-VsDevShell.ps1" | cargo build --all
39-
shell: bash
40-
env:
41-
RUSTFLAGS: -C target-cpu=generic
4233

4334
# You can add more experimental jobs here in the future
4435
# test_another_experimental:

0 commit comments

Comments
 (0)