Setup CodeQL #3
Workflow file for this run
This file contains 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: | |
push: | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-22.04 | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['go', 'cpp', 'actions'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
trap-caching: false | |
- name: Install deps (for C++) | |
if: contains(matrix.language, 'cpp') # Run this step only for C++ | |
shell: bash | |
run: | | |
sudo apt-get update --error-on=any | |
sudo apt-get install --yes \ | |
libtool cmake automake autoconf make ninja-build curl unzip \ | |
virtualenv openjdk-11-jdk build-essential libc++1 | |
mkdir -p bin/clang17 | |
cd bin/clang17 | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.0/clang+llvm-17.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | |
tar -xf clang+llvm-17.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components 1 | |
- name: Build (for C++) | |
if: contains(matrix.language, 'cpp') # Run this step only for C++ | |
run: | | |
bazel/setup_clang.sh bin/clang14 | |
bazelisk shutdown | |
bazel build \ | |
-c fastbuild \ | |
--spawn_strategy=local \ | |
--discard_analysis_cache \ | |
--nouse_action_cache \ | |
--features="-layering_check" \ | |
--config=clang-libc++ \ | |
--config=ci \ | |
//source/common/http/... | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v3 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: '/language:${{matrix.language}}' | |
trap-caching: false |