Skip to content

Commit f44f337

Browse files
committed
QL: cache the compiled extractor
1 parent 380d238 commit f44f337

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/ql-for-ql-build.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,39 @@ jobs:
5656

5757
steps:
5858
- uses: actions/checkout@v2
59-
- uses: actions/cache@v2
59+
- name: Cache entire extractor
60+
id: cache-extractor
61+
uses: actions/cache@v2
62+
with:
63+
path: |
64+
ql/target/release/ql-autobuilder
65+
ql/target/release/ql-autobuilder.exe
66+
ql/target/release/ql-extractor
67+
ql/target/release/ql-extractor.exe
68+
key: ${{ runner.os }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('ql/**/*.rs') }}
69+
- name: Cache cargo
70+
if: steps.cache-extractor.outputs.cache-hit != 'true'
71+
uses: actions/cache@v2
6072
with:
6173
path: |
6274
~/.cargo/registry
6375
~/.cargo/git
6476
ql/target
65-
key: ${{ runner.os }}-rust-cargo-${{ hashFiles('**/Cargo.lock') }}
77+
key: ${{ runner.os }}-rust-cargo-${{ hashFiles('ql/**/Cargo.lock') }}
6678
- name: Check formatting
79+
if: steps.cache-extractor.outputs.cache-hit != 'true'
6780
run: cd ql; cargo fmt --all -- --check
6881
- name: Build
82+
if: steps.cache-extractor.outputs.cache-hit != 'true'
6983
run: cd ql; cargo build --verbose
7084
- name: Run tests
85+
if: steps.cache-extractor.outputs.cache-hit != 'true'
7186
run: cd ql; cargo test --verbose
7287
- name: Release build
88+
if: steps.cache-extractor.outputs.cache-hit != 'true'
7389
run: cd ql; cargo build --release
7490
- name: Generate dbscheme
91+
if: steps.cache-extractor.outputs.cache-hit != 'true'
7592
run: ql/target/release/ql-generator --dbscheme ql/ql/src/ql.dbscheme --library ql/ql/src/codeql_ql/ast/internal/TreeSitter.qll
7693
- uses: actions/upload-artifact@v2
7794
with:

0 commit comments

Comments
 (0)