From 4a81f5c5186ccbbb26ed9348d13b72fe23da58eb Mon Sep 17 00:00:00 2001 From: Hinko Kocevar Date: Sun, 6 Apr 2025 12:11:24 +0200 Subject: [PATCH] Add CodeQL workflow for my branch --- .github/workflows/codeql-analysis.yml | 64 +++++++++++++++++++++++++++ 1 file changed, 64 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 000000000..09223d589 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,64 @@ +name: "CodeQL" + +on: + push: + branches: 7.0 + tags: 'R7.0.*' + pull_request: + branches: 7.0 + paths-ignore: + - '.appveyor/*' + - '.tools/*' + - 'documentation/*' + - 'startup/*' + - '**/*.md' + - '**/*.html' + +jobs: + analyze: + name: Analyze + runs-on: + - ubuntu-latest + # - windows-latest + # Supported by CodeQL which would check the Windows + # port, but needs more work here to set it up + + permissions: + # Required for all workflows: + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ cpp ] + + steps: + - name: Checkout Repositories + uses: actions/checkout@v4 + with: + submodules: false + + - name: Install Packages + run: | + sudo apt-get update + sudo apt-get install --yes libreadline-dev + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql/config.yml + + - name: Build C/C++ + run: | + echo '*** Building with these versions >>>' + g++ --version + make --version + perl --version + echo '<<<' + make -sj2 || echo '*** Ignoring build failure for CodeQL ***' + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}"