CodeQL #135
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 ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "*" ] | |
schedule: | |
- cron: '44 6 * * 4' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
container: | |
image: alt:sisyphus | |
env: | |
CC: ccache gcc | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CXX: ccache g++ | |
USE_CCACHE: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'cpp' ] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | |
# Learn more: | |
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | |
steps: | |
- name: cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ runner.os }}-ccache | |
restore-keys: | | |
${{ runner.os }}-ccache | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: install packages | |
run: | | |
apt-get update && apt-get -y install etersoft-build-utils su sudo \ | |
ccache git-core ccache gcc-c++ etersoft-build-utils catch-devel \ | |
libcomedi-devel libmariadb-devel libpqxx-devel libsqlite3-devel \ | |
libxml2-devel libsigc++2-devel libpoco-devel libev-devel libprotobuf-devel grpc-plugins libgrpc++-devel \ | |
libmosquitto-devel \ | |
xsltproc python3-dev python-module-distribute swig | |
- name: build | |
run: | | |
export CXXFLAGS='-pipe -O2 -pedantic -Wall' | |
# due broken comedi | |
export CXXFLAGS="$CXXFLAGS -Wl,--unresolved-symbols=ignore-in-shared-libs" | |
autoreconf -fiv | |
./configure --disable-netdata --disable-python --disable-pgsql --disable-clickhouse --disable-opcua --disable-tests | |
make | |
- name: Show summary of ccache configuration and statistics counters | |
run: ccache --show-stats | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |