#6750 Installed gcovr via pip and split steps
This commit is contained in:
parent
bae5707417
commit
a5b55eb7df
1 changed files with 48 additions and 34 deletions
22
.github/workflows/job-sonarcloud.yml
vendored
22
.github/workflows/job-sonarcloud.yml
vendored
|
|
@ -17,21 +17,30 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Run Sonar
|
- name: Installing gcovr
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gcovr
|
apt-get install -y python
|
||||||
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
python get-pip.py
|
||||||
|
pip install gcovr
|
||||||
|
- name: Installing Sonar Scanner
|
||||||
|
run: |
|
||||||
export SONAR_SCANNER_VERSION=4.4.0.2170
|
export SONAR_SCANNER_VERSION=4.4.0.2170
|
||||||
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
||||||
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
|
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
|
||||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
|
||||||
export SONAR_SCANNER_OPTS="-server"
|
|
||||||
|
|
||||||
|
- name: Installing buildWrapper
|
||||||
|
run: |
|
||||||
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
||||||
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||||
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
|
||||||
mkdir build-release
|
mkdir build-release
|
||||||
cd build-release
|
cd build-release
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=ON ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=ON ..
|
||||||
|
|
@ -43,6 +52,11 @@ jobs:
|
||||||
echo "hmm"
|
echo "hmm"
|
||||||
make coverage
|
make coverage
|
||||||
|
|
||||||
|
- name: Run Sonar
|
||||||
|
run: |
|
||||||
|
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||||
|
export SONAR_SCANNER_OPTS="-server"
|
||||||
|
cd build-release
|
||||||
sonar-scanner \
|
sonar-scanner \
|
||||||
-Dsonar.organization=symless \
|
-Dsonar.organization=symless \
|
||||||
-Dsonar.projectKey=symless_synergy-core \
|
-Dsonar.projectKey=symless_synergy-core \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue