CodeQL #110
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: | |
schedule: | |
- cron: '0 6 * * 6' # Every saturday at 06:00 | |
workflow_dispatch: | |
jobs: | |
analyze-go: | |
name: Analyze Go Code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: go | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
analyze-cpp: | |
name: Analyze C++ Code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: cpp | |
- name: Prepare environment | |
run: | | |
shopt -s extglob | |
rm -rf !("compiler") | |
cp -fR ./compiler/cpp/* . | |
rm -rf ./compiler | |
- name: Download Libs | |
run: | | |
mkdir -p ./lib/json | |
cd lib | |
git clone https://github.com/google/googletest.git | |
curl -sSL "https://github.com/nlohmann/json/releases/download/v3.11.2/json.hpp" --output json/json.hpp | |
- name: Build project | |
uses: nicledomaS/[email protected] | |
with: | |
submodule_update: ON | |
run_tests: ON | |
cmake_args: -DWITH_TESTS=ON | |
unit_test_build: -Dtest=ON | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
analyze-java: | |
name: Analyze Java Code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: java | |
- name: Set up JDK 15 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 15 | |
distribution: adopt | |
- name: Run the Maven verify phase | |
working-directory: compiler/java | |
run: mvn verify --batch-mode --update-snapshots --quiet --no-transfer-progress | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |