1616 - uses : actions/checkout@v2
1717 - name : Find codeql
1818 id : find-codeql
19- uses : github/codeql-action/init@esbena /ql
19+ uses : github/codeql-action/init@erik-krogh /ql
2020 with :
2121 languages : javascript # does not matter
2222 - name : Get CodeQL version
@@ -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 :
@@ -120,6 +137,9 @@ jobs:
120137 retention-days : 1
121138 analyze :
122139 runs-on : ubuntu-latest
140+ strategy :
141+ matrix :
142+ folder : [cpp, csharp, java, javascript, python, ql, ruby]
123143
124144 needs :
125145 - package
@@ -146,12 +166,27 @@ jobs:
146166
147167 - name : Checkout repository
148168 uses : actions/checkout@v2
169+ - name : Create CodeQL config file
170+ run : |
171+ echo "paths:" > ${CONF}
172+ echo " - ${FOLDER}" >> ${CONF}
173+ echo "paths-ignore:" >> ${CONF}
174+ echo " - ql/ql/test" >> ${CONF}
175+ echo "Config file: "
176+ cat ${CONF}
177+ env :
178+ CONF : ./ql-for-ql-config.yml
179+ FOLDER : ${{ matrix.folder }}
149180
150181 - name : Initialize CodeQL
151- uses : github/codeql-action/init@esbena /ql
182+ uses : github/codeql-action/init@erik-krogh /ql
152183 with :
153184 languages : ql
154185 db-location : ${{ runner.temp }}/db
186+ config-file : ./ql-for-ql-config.yml
155187
156188 - name : Perform CodeQL Analysis
157- uses : github/codeql-action/analyze@esbena/ql
189+ uses : github/codeql-action/analyze@erik-krogh/ql
190+ with :
191+ category : " ql-for-ql-${{ matrix.folder }}"
192+
0 commit comments