From a7c92e2d2471c1442c65e5ea95a7dce8061f5784 Mon Sep 17 00:00:00 2001 From: Mario Campos Date: Mon, 28 Aug 2023 19:58:46 -0500 Subject: ci: add CodeQL code scanning (closes #2102) --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2db9f58c6..60f296b1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,10 @@ name: CI on: - - push - - pull_request + push: + pull_request: + schedule: + - cron: '22 9 * * 2' env: WEECHAT_DEPENDENCIES: >- @@ -210,3 +212,39 @@ jobs: weechat-curses --help weechat --version weechat --run-command "/debug dirs;/debug libs" --run-command "/quit" + + codeql-analysis: + + name: CodeQL + runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }} + # uninstall php imagick as is causes a crash when loading php plugin (see #2009) + sudo apt-get --yes purge php8.1-imagick + sudo -H pip3 install --ignore-installed msgcheck + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: cpp + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:cpp" -- cgit v1.2.3