Skip to content

Commit 4e5d514

Browse files
committed
Cache the Nix store for improved runtime
1 parent 131f6ab commit 4e5d514

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/codeql.yml

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424

25+
- name: Cache Nix Store
26+
uses: actions/cache@v4
27+
id: cache
28+
with:
29+
path: /nix/store
30+
key: ${{ runner.os }}-${{ hashFiles('tooling/**') }}
31+
32+
- name: Prepare Nix Store
33+
if: steps.cache.outputs.cache-hit != 'true'
34+
run: |
35+
nix-shell --pure --command "codeql version" tooling/shell.nix
36+
2537
- name: Create database
2638
run: |
2739
nix-shell --pure --command "codeql database create --language=ql --source=. $RUNNER_TEMP/ql-db" tooling/shell.nix

0 commit comments

Comments
 (0)