CodeQL #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CodeQL | |
| on: | |
| schedule: | |
| # Run weekly on Monday at 06:00 UTC | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze (${{ matrix.language }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - language: c-cpp | |
| build-mode: autobuild | |
| - language: rust | |
| build-mode: none | |
| - language: python | |
| build-mode: none | |
| - language: actions | |
| build-mode: none | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Install build dependencies | |
| if: matrix.language == 'c-cpp' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| git build-essential pkg-config autoconf automake libtool \ | |
| bison flex libpq-dev libunwind-dev parallel sed perl \ | |
| postgresql ccache clang-format-12 libc++-dev libc++abi-dev | |
| - name: Install Rust toolchain | |
| if: matrix.language == 'c-cpp' || matrix.language == 'rust' | |
| run: ./install-rust.sh | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.build-mode }} | |
| config-file: ./.github/codeql/codeql-config.yml | |
| - name: Configure | |
| if: matrix.language == 'c-cpp' | |
| run: | | |
| ./autogen.sh | |
| ./configure --enable-ccache --enable-sdfprefs | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:${{ matrix.language }}" |