Skip to content

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Coverage
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- '**'
jobs:
sonarcloud:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Create Dependencies Environment
shell: bash
working-directory: ${{runner.workspace}}
run: cmake -E make_directory ${{runner.workspace}}/dependencies
- name: Add apt-repositories
shell: bash
working-directory: ${{runner.workspace}}
run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- name: Download Dependencies
shell: bash
working-directory: ${{runner.workspace}}/dependencies
run: git clone --branch 22.12 https://github.com/ths-rwth/carl carl && cd carl && git checkout 0c99bd8 && sudo apt install libeigen3-dev libboost-chrono-dev libboost-system-dev libboost-program-options-dev libboost-test-dev libboost-timer-dev libboost-serialization-dev uuid-dev doxygen
- name: Download & Unzip Build-wrapper & scanner
shell: bash
working-directory: ${{runner.workspace}}/dependencies
run: curl https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip --output build-wrapper-linux-x86.zip && unzip build-wrapper-linux-x86.zip && curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip --output scanner.zip && unzip scanner.zip
#- name: Cache Dependencies
# id: cache-dependencies
# uses: actions/cache@v2
# with:
# path: ${{runner.workspace}}/dependencies
# key: ${{ runner.os }}-deps
- name: Create Build Environment for Dependencies
shell: bash
working-directory: ${{runner.workspace}}/dependencies
# if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: cmake -E make_directory ${{runner.workspace}}/dependencies/carl/build
- name: Configure Dependencies
shell: bash
working-directory: ${{runner.workspace}}/dependencies/carl/build
# if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- name: Build Dependencies
shell: bash
working-directory: ${{runner.workspace}}/dependencies/carl/build
# if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: cmake --build . -j 3 --target carl-arith carl-common carl-formula
- name: Configure Project
working-directory: ${{runner.workspace}}/hypro
run: mkdir build && cd build && cmake .. -DHYPRO_CICD=ON
- name: Copy Sonarcloud Properties File
working-directory: ${{runner.workspace}}/hypro
run: cp .travis/sonar-project.properties .
- name: Build Project with Build-wrapper
working-directory: ${{runner.workspace}}/hypro/build
run: ${{runner.workspace}}/dependencies/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir ${{runner.workspace}}/hypro/bw-output make clean all
- name: SonarCloud Scan
#uses: SonarSource/sonarcloud-github-action@master
#with:
# projectBaseDir: ${{runner.workspace}}/hypro
# args: -X -Dsonar.verbose=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: ${{runner.workspace}}/hypro
run: ${{runner.workspace}}/dependencies/sonar-scanner-4.5.0.2216-linux/bin/sonar-scanner -X