Files
bar/.gitea/workflows/ci.yml
Arif Hasanic 8873c4eb3c
Some checks failed
ci / SonarQube Trigger (push) Failing after 9s
ci / build (push) Successful in 35s
add sonar qube
2026-02-01 23:28:51 +01:00

58 lines
1.6 KiB
YAML

name: ci
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container:
image: git.rivercry.com/system/bar:latest
credentials:
username: docker
password: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Checkout
run: |
git init
git remote add origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@git.rivercry.com/${{ github.repository }}.git
git fetch --depth 1 origin ${{ github.sha }}
git checkout FETCH_HEAD
- name: Toolchain Info
run: |
echo "CC=$CC"
echo "CXX=$CXX"
command -v gcc || true
command -v g++ || true
command -v gcov || true
gcc --version || true
g++ --version || true
gcov --version || true
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
- name: Build
run: cmake --build build --config Debug -j "$(nproc)"
- name: Test & Coverage
run: |
cd build
ctest -T Test --output-on-failure
ctest -T Coverage --output-on-failure
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: kitabisa/sonarqube-action@v1.2.0
with:
host: ${{ secrets.SONARQUBE_HOST }}
login: ${{ secrets.SONARQUBE_TOKEN }}