Skip to content

Commit 5adf65a

Browse files
committed
fix CI conflicting cache keys
fix test CI cache-deps jobs' runner OS
1 parent fd1cd19 commit 5adf65a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/build-docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/cache@v4
1717
with:
1818
path: ~/.cargo
19-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
19+
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
2020
- run: cargo fetch
2121

2222
build-mdbook:
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/cache/restore@v4
3131
with:
3232
path: ~/.cargo
33-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
33+
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
3434
- name: Install mdbook
3535
uses: taiki-e/install-action@v2
3636
with:
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions/cache/restore@v4
6363
with:
6464
path: ~/.cargo
65-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
65+
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
6666
- run: cargo doc --no-deps --manifest-path cpp-linter-lib/Cargo.toml
6767
- name: upload rustdoc build as artifact
6868
uses: actions/upload-artifact@v4

.github/workflows/run-dev-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ env:
2323

2424
jobs:
2525
cache-deps:
26-
runs-on: ubuntu-latest
26+
runs-on: ${{ matrix.os }}
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
os: ['windows-latest', ubuntu-latest]
30+
os: [windows-latest, ubuntu-latest]
3131
steps:
3232
- run: rustup update --no-self-update
3333
- uses: actions/checkout@v4
3434
- name: Cache .cargo locked resources
3535
uses: actions/cache@v4
3636
with:
3737
path: ~/.cargo
38-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
38+
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}
3939
- run: cargo fetch
4040

4141
test:
@@ -111,7 +111,7 @@ jobs:
111111
uses: actions/cache/restore@v4
112112
with:
113113
path: ~/.cargo
114-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
114+
key: ${{ runner.os }}-test-cargo-${{ hashFiles('Cargo.lock') }}
115115

116116
- name: Collect Coverage
117117
working-directory: cpp-linter-lib

0 commit comments

Comments
 (0)