Skip to content

Google test

Google test #5

Workflow file for this run

name: development
on:
push:
branches: ["master"]
paths:
- 'lib/**'
- 'test/**'
pull_request:
types:
- opened
- edited
- synchronize
- reopened
paths:
- 'lib/**'
- 'test/**'
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
type: [double, float]
steps:
- uses: actions/checkout@v4
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
- name: CMake Generate
shell: pwsh
run: .\project.ps1 generate ${{matrix.type}}
- name: CMake Build
shell: pwsh
run: .\project.ps1 build
- name: Run Tests
run: .\project.ps1 test
sonar:
runs-on: windows-2022
needs: [build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Install Sonar
uses: sonarsource/sonarcloud-github-c-cpp@v2
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
- name: CMake Generate
shell: pwsh
run: .\project.ps1 generate float
- name: CMake Build with Sonar
shell: pwsh
run: build-wrapper-win-x86-64.exe --out-dir build_wrapper_output pwsh.exe .\project.ps1 build Debug
- name: Run Tests
shell: pwsh
run: .\project test-generate-report
- name: Run Sonar Scanner
run: sonar-scanner --define sonar.token=${{secrets.SONARCLOUD_TOKEN}} --define sonar.organization=${{secrets.SONARCLOUD_ORGANIZATION}}