Skip to content

Commit b1db390

Browse files
committed
Ruby: use compilation cache in the ruby-build workflow
1 parent 9c79290 commit b1db390

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ruby-build.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,18 @@ jobs:
9393
- uses: actions/checkout@v3
9494
- name: Fetch CodeQL
9595
uses: ./.github/actions/fetch-codeql
96+
- name: Cache compilation cache
97+
id: query-cache
98+
uses: ./.github/actions/cache-query-compilation
99+
with:
100+
key: ruby-build
96101
- name: Build Query Pack
97102
run: |
98-
codeql pack create ../shared/ssa --output target/packs
99-
codeql pack create ../misc/suite-helpers --output target/packs
100-
codeql pack create ../shared/regex --output target/packs
101-
codeql pack create ql/lib --output target/packs
102-
codeql pack create ql/src --output target/packs
103+
codeql pack create ../shared/ssa --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
104+
codeql pack create ../misc/suite-helpers --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
105+
codeql pack create ../shared/regex --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
106+
codeql pack create ql/lib --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
107+
codeql pack create ql/src --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
103108
PACK_FOLDER=$(readlink -f target/packs/codeql/ruby-queries/*)
104109
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
105110
(cd ql/src; find queries \( -name '*.qhelp' -o -name '*.rb' -o -name '*.erb' \) -exec bash -c 'mkdir -p "'"${PACK_FOLDER}"'/$(dirname "{}")"' \; -exec cp "{}" "${PACK_FOLDER}/{}" \;)

0 commit comments

Comments
 (0)