#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
82
.github/workflows/job-sonarcloud.yml
vendored
82
.github/workflows/job-sonarcloud.yml
vendored
|
|
@ -16,42 +16,56 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Installing gcovr
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
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_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
|
||||||
|
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
|
|
||||||
|
- 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
|
||||||
|
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||||
|
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
|
||||||
|
mkdir build-release
|
||||||
|
cd build-release
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=ON ..
|
||||||
|
. ./version
|
||||||
|
|
||||||
|
build-wrapper-linux-x86-64 --out-dir bw-output make -j
|
||||||
|
|
||||||
|
./bin/unittests
|
||||||
|
echo "hmm"
|
||||||
|
make coverage
|
||||||
|
|
||||||
- name: Run Sonar
|
- name: Run Sonar
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||||
apt-get install -y gcovr
|
export SONAR_SCANNER_OPTS="-server"
|
||||||
export SONAR_SCANNER_VERSION=4.4.0.2170
|
cd build-release
|
||||||
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
sonar-scanner \
|
||||||
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
|
-Dsonar.organization=symless \
|
||||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
-Dsonar.projectKey=symless_synergy-core \
|
||||||
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
-Dsonar.sources=. \
|
||||||
export SONAR_SCANNER_OPTS="-server"
|
-Dsonar.projectBaseDir=../ \
|
||||||
|
-Dsonar.exclusions=./ext/**,**/build-release/** \
|
||||||
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
-Dsonar.cfamily.build-wrapper-output=bw-output \
|
||||||
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
-Dsonar.host.url=https://sonarcloud.io \
|
||||||
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
-Dsonar.coverageReportPaths=build-release/coverage.xml
|
||||||
|
|
||||||
mkdir build-release
|
|
||||||
cd build-release
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=ON ..
|
|
||||||
. ./version
|
|
||||||
|
|
||||||
build-wrapper-linux-x86-64 --out-dir bw-output make -j
|
|
||||||
|
|
||||||
./bin/unittests
|
|
||||||
echo "hmm"
|
|
||||||
make coverage
|
|
||||||
|
|
||||||
sonar-scanner \
|
|
||||||
-Dsonar.organization=symless \
|
|
||||||
-Dsonar.projectKey=symless_synergy-core \
|
|
||||||
-Dsonar.sources=. \
|
|
||||||
-Dsonar.projectBaseDir=../ \
|
|
||||||
-Dsonar.exclusions=./ext/**,**/build-release/** \
|
|
||||||
-Dsonar.cfamily.build-wrapper-output=bw-output \
|
|
||||||
-Dsonar.host.url=https://sonarcloud.io \
|
|
||||||
-Dsonar.coverageReportPaths=build-release/coverage.xml
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
|
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue