Skip to content

add dependabot.yml #623

add dependabot.yml

add dependabot.yml #623

---
# Configuration script for github continuous integration service
name: SonarScanner
on:
push:
branches: [master]
paths-ignore:
- "*.md"
- "*.cff"
- "env/csv/*.csv"
- "env/maze/*.txt"
- "cfg/*.json"
- "python/*.py"
- "python/notebooks/*.ipynb"
pull_request:
branches: [master]
paths-ignore:
- "*.md"
- "*.cff"
- "env/csv/*.csv"
- "env/maze/*.txt"
- "cfg/*.json"
- "python/*.py"
- "python/notebooks/*.ipynb"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CC: gcc-9
CXX: g++-9
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Configure and Build
working-directory: build
run: |
sudo apt install lcov gcovr
cmake .. -DCMAKE_BUILD_TYPE=Debug -DXCSF_PYLIB=OFF -DENABLE_TESTS=ON -DPARALLEL=ON -DUSE_GCOV=ON
wget -q https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -q build-wrapper-linux-x86.zip
cp ./build-wrapper-linux-x86/libinterceptor-x86_64.so ./build-wrapper-linux-x86/libinterceptor-haswell.so
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make clean all
- name: Report code coverage
run: |
lcov --directory . --capture --output-file lcov.info
lcov --remove lcov.info '/usr/*' '*/extlib/*' '*/lib/*' '*/test/*' --output-file coverage.info
lcov --list coverage.info;
gcovr -r ./ -x > report.xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup SonarQube
uses: warchant/setup-sonar-scanner@v7
- name: Sonarqube coverage
run: |
gcovr --sonarqube > coverage.xml
- name: Run sonarqube
run: sonar-scanner
-Dsonar.host.url=https://sonarcloud.io/
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.projectKey=xcsf-dev_xcsf
-Dsonar.organization=xcsf-dev
-Dsonar.projectVersion=1.0
-Dsonar.projectBaseDir=./
-Dsonar.cfamily.build-wrapper-output=build/bw-output
-Dsonar.cfamily.analysisCache.mode=server
-Dsonar.cfamily.threads=1
-Dsonar.coverage.exclusions="python/**,test/**,lib/**,doc/**"
-Dsonar.exclusions="python/**,test/**,lib/**,doc/**"
-Dsonar.sourceEncoding=UTF-8
-Dsonar.coverageReportPaths=coverage.xml
-Dsonar.python.version=3.11
...