Skip to content

Commit

Permalink
Enable GitHub CodeQL static analysis in CI (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
yadij authored and squid-anubis committed Aug 30, 2023
1 parent 9fb4ef4 commit 4cf4730
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -120,3 +120,33 @@ jobs:
with:
name: build-logs-${{ runner.os }}
path: btlayer-*.log

CodeQL-tests:

runs-on: [ ubuntu-22.04 ]

permissions:
security-events: write

steps:

- name: Install Squid prerequisite Linux packages
if: runner.os == 'Linux'
run: |
# required for "apt-get build-dep" to work
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2

- name: Build Squid
run: ./test-builds.sh ./test-suite/buildtests/layer-02-maximus.opts

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit 4cf4730

Please sign in to comment.