name: "CodeQL and Unit Tests" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '21 0 * * 2' jobs: analyze: name: ๐Ÿ› Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write steps: - name: ๐Ÿงฐ Checkout uses: actions/checkout@v2 with: fetch-depth: 0 submodules: recursive - name: โœ‹ Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: 'cpp' - name: โฌ‡๏ธ Install dependencies run: | sudo apt update sudo bash dist/get_deps_debian.sh - name: ๐Ÿ› ๏ธ Build run: | mkdir build cd build CC=gcc-10 CXX=g++-10 cmake \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_INSTALL_PREFIX="$PWD/install" \ .. make -j 4 install - name: ๐Ÿงช Perform Unit Tests run: | cd build ctest - name: ๐Ÿ—ฏ๏ธ Perform CodeQL Analysis uses: github/codeql-action/analyze@v1