4747 uses : actions/setup-python@v4
4848 with :
4949 python-version : " 3.9"
50+
51+ - name : Install Python dependencies
52+ run : pip install -r scripts/requirements.txt
5053
5154 - name : Cache CodeQL
5255 id : cache-codeql
@@ -66,11 +69,16 @@ jobs:
6669 codeql-home : ${{ github.workspace }}/codeql_home
6770 add-to-path : false
6871
72+ - name : Install CodeQL packs
73+ uses : ./.github/actions/install-codeql-packs
74+ with :
75+ cli_path : ${{ github.workspace }}/codeql_home/codeql
76+
6977 - name : Pre-Compile Queries
7078 id : pre-compile-queries
7179 run : |
72- ${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path cpp -- threads 0 cpp
73- ${{ github.workspace }}/codeql_home/codeql/codeql query compile --search-path c --search-path cpp -- threads 0 c
80+ ${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 cpp
81+ ${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 c
7482
7583
7684 - name : Run test suites
@@ -122,18 +130,11 @@ jobs:
122130 os.makedirs(os.path.dirname(test_report_path), exist_ok=True)
123131 test_report_file = open(test_report_path, 'w')
124132 files_to_close.append(test_report_file)
125- if "${{ matrix.language }}".casefold() == "c".casefold():
126- # c tests require cpp -- but we don't want c things on the cpp
127- # path in case of design errors.
128- cpp_language_root = Path(workspace, 'cpp')
129- procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={cpp_language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
130- else:
131- procs.append(subprocess.Popen([codeql_bin, "test", "run", "--failing-exitcode=122", f"--slice={slice}/{num_slices}", "--ram=2048", "--format=json", f'--search-path={language_root}', f'--search-path={language_root}', *test_roots], stdout=test_report_file, stderr=subprocess.PIPE))
133+ 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))
132134
133135 for p in procs:
134- p.wait ()
136+ _, err = p.communicate ()
135137 if p.returncode != 0:
136- _, err = p.communicate()
137138 if p.returncode == 122:
138139 # Failed because a test case failed, so just print the regular output.
139140 # This will allow us to proceed to validate-test-results, which will fail if
0 commit comments