sonar-cloud script updated to latest #572
Workflow file for this run
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: SonarCloud Scan | |
on: | |
push: | |
branches: | |
- stable | |
- development | |
- helios_stage | |
pull_request: | |
branches: | |
- stable | |
- development | |
- helios_stage | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
SONAR_SCANNER_VERSION: 4.4.0.2170 | |
SONAR_SERVER_URL: "https://sonarcloud.io" | |
BUILD_WRAPPER_OUT_DIR: bw-output # Directory where build-wrapper output will be placed | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install Dependencies | |
run: | | |
wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip | |
sudo apt-get install cppcheck unzip -y | |
unzip build-wrapper-linux-x86.zip | |
ls -las build-wrapper-linux-x86 | |
export BUILD_WRAPPER_PATH=$(pwd)/build-wrapper-linux-x86 | |
echo $BUILD_WRAPPER_PATH | |
- name: Configure Git | |
env: | |
TOKEN: ${{ secrets.AKASH_VF }} | |
run: git config --global url."https://${TOKEN}:[email protected]/".insteadOf "https://github.com/" | |
- name: Get Toolchains | |
run: | | |
make get_avr_tc AVR_TC_REPO=https://github.com/VisorFolks/avr-toolchain.git | |
make get_riscv_tc RISC_V_TC_REPO=https://github.com/VisorFolks/risc-v-toolchain.git | |
- name: Build | |
run: | | |
pwd | |
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make demo_riscv | |
ls -las | |
export BUILD_WRAPPER_OUTPUT_PATH=$(pwd)/build_wrapper_output_directory | |
echo "BUILD_WRAPPER_OUTPUT_PATH = $BUILD_WRAPPER_OUTPUT_PATH" | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: /home/runner/work/cyancore/cyancore/ | |
args: > | |
-Dsonar.organization=cyancore | |
-Dsonar.projectKey=VisorFolks_cyancore | |
-Dsonar.sources=src | |
-Dsonar.verbose=true | |
-Dsonar.cfamily.threads=4 | |
-Dsonar.cfamily.build-wrapper-output=build_wrapper_output_directory |