[linux-nfc] [neard][PATCH v2 09/11] ci: add CodeQL static analysis

Krzysztof Kozlowski <[email protected]> Wed, 4 Aug 2021 10:42:16 +0200
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
Add Github CodeQL static analysis workflow.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 .github/workflows/codeql-analysis.yml | 45 +++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 .github/workflows/codeql-analysis.yml

diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 000000000000..66ad27d5eca0
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (c) 2021 Canonical Ltd.
+# Author: Krzysztof Kozlowski <[email protected]>
+#                             <[email protected]>
+#
+name: "CodeQL"
+on: [push, pull_request]
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'cpp', 'python' ]
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v2
+
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+
+    - name: Install additional packages
+      run: sudo ./ci/ubuntu.sh
+
+    - name: Configure
+      run: ./bootstrap-configure
+
+    - name: Compile
+      run: |
+        make -j$(nproc)
+        make check
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1
-- 
2.30.2
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s