- Notifications
You must be signed in to change notification settings - Fork0
Fix sonarqube scan#6
Workflow file for this run
This file contains hidden or 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:CI | |
| on: | |
| push: | |
| branches:[ main, master ] | |
| pull_request: | |
| branches:[ main, master ] | |
| jobs: | |
| build: | |
| runs-on:ubuntu-latest | |
| env: | |
| BUILD_WRAPPER_OUT_DIR:build_wrapper_output_directory | |
| steps: | |
| -uses:actions/checkout@v4 | |
| # - name: Install dependencies | |
| # run: sudo apt-get update && sudo apt-get install -y cmake g++-11 | |
| -name:Configure CMake | |
| run:cmake -S . -B build -DCMAKE_CXX_STANDARD=11 | |
| -name:Build | |
| run:cmake --build build | |
| -name:Run tests | |
| run:ctest --test-dir build || true | |
| -name:Install Build Wrapper | |
| uses:SonarSource/sonarqube-scan-action/install-build-wrapper@v4 | |
| -name:Run Build Wrapper | |
| run:| | |
| build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release | |
| -name:SonarQube Scan | |
| uses:SonarSource/sonarqube-scan-action@v4 | |
| env: | |
| SONAR_TOKEN:${{ secrets.SONARCLOUD_TOKEN }}# Put the name of your token here | |
| with: | |
| args:> | |
| --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" |