Skip to content

Commit 5c98104

Browse files
authored
feat(ql): Update codeql-ql to add caching
1 parent 58e6177 commit 5c98104

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/codeql-ql.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ jobs:
2222

2323
- name: "Set up Rust"
2424
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # v1.85.1
25+
with:
26+
toolchain: stable
27+
28+
- name: "Restore cached Cargo"
29+
id: cache-restore
30+
uses: actions/cache/restore@v4
31+
with:
32+
path: |
33+
~/.cargo/bin/
34+
~/.cargo/registry/index/
35+
~/.cargo/registry/cache/
36+
~/.cargo/git/db/
37+
target/
38+
key: ${{ runner.os }}-stable-cargo
2539

2640
- name: "Build QL-for-QL"
2741
env:
@@ -96,3 +110,16 @@ jobs:
96110
with:
97111
sarif_file: ${{ steps.run_ql.outputs.sarif }}
98112
category: "/codeql:ql"
113+
114+
- name: Save Cargo / Rust Cache
115+
id: cache-save
116+
if: ${{ github.event_name == 'push' }}
117+
uses: actions/cache/save@v4
118+
with:
119+
path: |
120+
~/.cargo/bin/
121+
~/.cargo/registry/index/
122+
~/.cargo/registry/cache/
123+
~/.cargo/git/db/
124+
target/
125+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)