CodeQL #514
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: | |
branches: [ "master", "develop" ] | |
pull_request: | |
branches: [ "master", "develop" ] | |
schedule: | |
- cron: "48 10 * * 4" | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ javascript, cpp ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- if: matrix.language == 'cpp' | |
name: Install dependencies (cpp) | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes build-essential cmake libboost-all-dev libconfig++-dev libavcodec-dev libavutil-dev libavformat-dev libstb-dev libtag1-dev libpam0g-dev libgtest-dev libarchive-dev | |
export WT_VERSION=4.9.0 | |
export WT_INSTALL_PREFIX=/usr | |
git clone https://github.com/emweb/wt.git /tmp/wt | |
pushd /tmp/wt | |
git checkout ${WT_VERSION} | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${WT_INSTALL_PREFIX} -DBUILD_EXAMPLES=OFF -DENABLE_LIBWTTEST=OFF -DCONNECTOR_FCGI=OFF | |
make -j$(nproc) | |
sudo make install | |
popd | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
queries: +security-and-quality | |
- if: matrix.language == 'javascript' | |
name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- if: matrix.language == 'cpp' | |
name: Build | |
run: | | |
mkdir -p build | |
cd build | |
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release .. | |
make -j$(nproc) | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{ matrix.language }}" |