Skip to content

Commit

Permalink
Playing with sonar on tests, add all tests files to git on a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mi-La committed Apr 12, 2024
1 parent c633800 commit 178a540
Show file tree
Hide file tree
Showing 2,279 changed files with 358,747 additions and 1,590 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Linux

on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
steps:
- run: |
echo "Demo build"
sonar-build:
needs: [cpp]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # shallow clones should be disabled for a better relevancy of analysis
submodules: recursive

- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2

- name: Set up Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Install dependencies
run: sudo apt-get install cmake doxygen graphviz

- name: Build zserio # TODO: download zserio compiler artifact
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"
CMAKE_BUILD_OPTIONS: "-j4"
run: |
scripts/build.sh core cpp zserio cpp_rt-linux64-gcc
- name: Run tests under build_wrapper
run: |
build-wrapper-linux-x86-64 --out-dir build-wrapper-tests scripts/test.sh cpp-linux64-gcc
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="build-wrapper-tests" \
--define sonar.projectKey="ndsev_zserio" \
--define sonar.organization="ndsev" \
--define sonar.sources="compiler/extensions/cpp/runtime/src,build/test/cpp/linux64-gcc/release" \
--define sonar.tests="compiler/extensions/cpp/runtime/test,test" \
--define sonar.sourceEncoding="UTF-8"
93 changes: 0 additions & 93 deletions .github/workflows/build_linux.yml

This file was deleted.

195 changes: 0 additions & 195 deletions .github/workflows/build_linux_cpp.yml

This file was deleted.

Loading

0 comments on commit 178a540

Please sign in to comment.