.github/workflows/codeql-daily.yml #73
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
on: | |
schedule: | |
- cron: '0 12 * * 4' | |
jobs: | |
CodeQL-Build: | |
strategy: | |
fail-fast: false | |
# CodeQL runs on ubuntu-latest and windows-latest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v2.3.4 | |
with: | |
# We must fetch at least the immediate parents so that if this is | |
# a pull request then we can checkout the head. | |
fetch-depth: 2 | |
# If this run was triggered by a pull request event, then checkout | |
# the head of the pull request instead of the merge commit. | |
- run: git checkout HEAD^2 | |
if: ${{ github.event_name == 'pull_request' }} | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@689fdc5193eeb735ecb2e52e819e3382876f93f4 # v1 | |
# Override language selection by uncommenting this and choosing your languages | |
with: | |
languages: cpp | |
- name: Install deps | |
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/clang11 | |
cd bin/clang11 | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz | |
tar -xf clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz --strip-components 1 | |
export PATH=bin/clang11/bin:$PATH | |
- name: Build | |
run: | | |
bazel/setup_clang.sh bin/clang11 | |
bazelisk shutdown | |
bazelisk build -c fastbuild --spawn_strategy=local --discard_analysis_cache --nouse_action_cache --config clang --config libc++ //source/common/http/... | |
- name: Clean Artifacts | |
run: | | |
git clean -xdf | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@689fdc5193eeb735ecb2e52e819e3382876f93f4 # v1 |