🔧 Updated sonarscan output
This commit is contained in:
parent
e3753d5d05
commit
e39895cf6f
16
.github/workflows/sonarcloud.yml
vendored
16
.github/workflows/sonarcloud.yml
vendored
@ -12,8 +12,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
SONAR_SCANNER_VERSION: 4.7.0.2747
|
SONAR_SCANNER_VERSION: 4.7.0.2747
|
||||||
SONAR_SERVER_URL: "https://sonarcloud.io"
|
|
||||||
BUILD_WRAPPER_OUT_DIR: sonar-out # Directory where build-wrapper output will be placed
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -30,11 +28,13 @@ jobs:
|
|||||||
mkdir -p $HOME/.sonar
|
mkdir -p $HOME/.sonar
|
||||||
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
|
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
|
||||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
|
wget -nv https://cdn.anotherfoxguy.com/sonar-scanner/mofilereader -O run-sonar-scanner
|
||||||
|
sudo chmod 777 run-sonar-scanner
|
||||||
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
|
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Download and set up build-wrapper
|
- name: Download and set up build-wrapper
|
||||||
env:
|
env:
|
||||||
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
|
BUILD_WRAPPER_DOWNLOAD_URL: https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
||||||
run: |
|
run: |
|
||||||
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
|
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
|
||||||
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||||
@ -44,8 +44,7 @@ jobs:
|
|||||||
run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TEST=ON -DENABLE_COVERAGE=ON .
|
run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TEST=ON -DENABLE_COVERAGE=ON .
|
||||||
|
|
||||||
- name: Run build-wrapper
|
- name: Run build-wrapper
|
||||||
run: |
|
run: build-wrapper-linux-x86-64 --out-dir bw-output make -j4
|
||||||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j4
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ctest --output-on-failure .
|
run: ctest --output-on-failure .
|
||||||
@ -56,8 +55,5 @@ jobs:
|
|||||||
- name: Run sonar-scanner
|
- name: Run sonar-scanner
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_SCANNER_EXE: /home/runner/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin/sonar-scanner
|
||||||
run: |
|
run: ./run-sonar-scanner
|
||||||
sonar-scanner \
|
|
||||||
--define sonar.host.url="${{ env.SONAR_SERVER_URL }}" \
|
|
||||||
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
sonar.host.url=https://sonarcloud.io
|
||||||
sonar.projectKey=AnotherFoxGuy_MofileReader
|
sonar.projectKey=AnotherFoxGuy_MofileReader
|
||||||
sonar.organization=anotherfoxguy-github
|
sonar.organization=anotherfoxguy-github
|
||||||
|
|
||||||
@ -11,4 +12,5 @@ sonar.sources=.
|
|||||||
# Encoding of the source code. Default is default system encoding
|
# Encoding of the source code. Default is default system encoding
|
||||||
#sonar.sourceEncoding=UTF-8
|
#sonar.sourceEncoding=UTF-8
|
||||||
|
|
||||||
sonar.cfamily.gcov.reportsPath=test
|
sonar.cfamily.gcov.reportsPath=test
|
||||||
|
sonar.cfamily.build-wrapper-output=bw-output
|
Loading…
x
Reference in New Issue
Block a user