Skip to content

Commit 7263a98

Browse files
committed
Static caching path
1 parent 17c43f3 commit 7263a98

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/codeql_unit_tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- name: Cache queries compilation
7878
uses: actions/cache@v6
7979
with:
80-
path: ~/.codeql
80+
path: ${{ github.workspace }}/codeql_cache
8181
key: ${{ runner.os }}-codeql-compilation-${{ github.run_id }}
8282
restore-keys: ${{ runner.os }}-codeql-compilation
8383

@@ -89,7 +89,10 @@ jobs:
8989
- name: Pre-Compile Queries
9090
id: pre-compile-queries
9191
run: |
92-
${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 ${{ matrix.language }}
92+
${{ github.workspace }}/codeql_home/codeql/codeql query compile \
93+
--common-caches=${{ github.workspace }}/codeql_cache \
94+
--threads 0 \
95+
${{ matrix.language }}
9396
9497
- name: Run test suites
9598
id: run-test-suites
@@ -140,7 +143,7 @@ jobs:
140143
os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
141144
test_report_file = open(test_report_path, 'w')
142145
files_to_close.append(test_report_file)
143-
procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
146+
procs.append(subprocess.Popen([codeql_bin, "test", "run", "--common-caches=${{ github.workspace }}/codeql_cache", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
144147
145148
for p in procs:
146149
_, err = p.communicate()

0 commit comments

Comments
 (0)