8000 ci: Switch to CodeQL Autobuild for compiled code · matplotlib/matplotlib@d670194 · GitHub
[go: up one dir, main page]

Skip to content

Commit d670194

Browse files
committed
ci: Switch to CodeQL Autobuild for compiled code
With the switch to Meson, CodeQL seemed to have started ignoring all our compiled code, presumably due to meson-python putting things in a random build directory. Since all that is necessary is a compile, we don't need all the Python metadata, and since the Autobuild step supports Meson, so we can just have it run it itself. We do need to install our build dependencies, but this is much shorter than before.
1 parent 3574dfd commit d670194

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,19 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030

31-
- name: Set up Python
32-
uses: actions/setup-python@v5
33-
if: matrix.language != 'javascript'
34-
with:
35-
python-version: '3.x'
31+
- name: Install dependencies
32+
if: matrix.language == 'c-cpp'
33+
run: pip install meson ninja numpy pybind11 setuptools-scm
3634

3735
- name: Initialize CodeQL
3836
uses: github/codeql-action/init@v3
3937
with:
4038
languages: ${{ matrix.language }}
4139
setup-python-dependencies: false
40+
debug: true
4241

43-
- name: Build compiled code
44-
if: matrix.language == 'c-cpp'
45-
run: |
46-
mkdir -p ~/.cache/matplotlib
47-
python -m pip install --upgrade pip setuptools wheel
48-
python -m pip install --upgrade build
49-
python -m build
42+
- name: CodeQL Autobuild
43+
uses: github/codeql-action/autobuild@v3
5044

5145
- name: Perform CodeQL Analysis
5246
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)
0