From 66e4b69042cd3b44acd42f1fad2109180c1bc48b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 24 Dec 2023 08:57:54 +0100 Subject: Merging upstream version 2.7.1. Signed-off-by: Daniel Baumann --- .github/workflows/codeql.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql.yml (limited to '.github/workflows/codeql.yml') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..d57e17a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,71 @@ +# CodeQL build configuration for nvme-cli +# Mostly based on auto-configuration with additions and tweaks for: +# * meson install +# * language detection +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '24 2 * * 5' + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: 'ubuntu-latest' + timeout-minutes: 360 + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'c-cpp', 'python' ] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install build tools + run: | + sudo apt-get update + sudo apt-get install meson + + # Initializes the CodeQL tools for scanning. + - if: matrix.language == 'c-cpp' + name: Initialize CodeQL C + uses: github/codeql-action/init@v3 + with: + languages: 'c-cpp' + + - if: matrix.language == 'python' + name: Initialize CodeQL Python + uses: github/codeql-action/init@v3 + with: + languages: 'python' + config-file: ./.github/codeql/codeql-config.yml + + - name: meson build + run: | + meson setup --force-fallback-for=libnvme,json-c .build + ninja -C .build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" -- cgit v1.2.3