Skip to content

Fix issues with bool VariableLengthArray (issues 74 and 75) #131

Fix issues with bool VariableLengthArray (issues 74 and 75)

Fix issues with bool VariableLengthArray (issues 74 and 75) #131

Workflow file for this run

name: "CETLVaSt"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ published ]
workflow_dispatch:
jobs:
verification:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts22.4.3
strategy:
matrix:
build_flavor: [Debug, Release]
exceptions: [exceptions, no-exceptions]
std: [14, 17, 20]
toolchain: [gcc, clang]
include:
- build_flavor: Coverage
exceptions: no-exceptions
std: 14
toolchain: gcc
exclude:
- build_flavor: Debug
exceptions: no-exceptions
std: 14
toolchain: gcc
steps:
- uses: actions/checkout@v3
- name: Cache ext modules
id: cetlvast-ext
uses: actions/cache@v3
env:
cache-name: cetlvast-ext-cache
with:
path: cetlvast/build_external
key: gtest_b796f7d44681514f58a683a3a71ff17c94edb0c1
- name: run tests
run: >
./build-tools/bin/verify.py
-v
--online
--asserts
--${{ matrix.exceptions }}
--build-flavor ${{ matrix.build_flavor }}
--cpp-standard ${{ matrix.std }}
--toolchain ${{ matrix.toolchain }}
test
- name: debug output
if: ${{ runner.debug == '1' }}
run: ls -lAhR build/
- name: upload-artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build_flavor }}-${{ matrix.exceptions }}-${{ matrix.std }}-${{ matrix.toolchain }}
path: |
build/compile_commands.json
build/*/**/coverage.xml
build/*/**/*-sonarqube.xml
build/*/**/gcovr_html/*.*
if-no-files-found: error
docs:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts22.4.3
steps:
- uses: actions/checkout@v3
- name: Cache ext modules
id: cetlvast-ext
uses: actions/cache@v3
env:
cache-name: cetlvast-ext-cache
with:
path: cetlvast/build_external
key: gtest_b796f7d44681514f58a683a3a71ff17c94edb0c1
- name: doc-gen
run: >
./build-tools/bin/verify.py
-v
--online
--asserts
--build-flavor Debug
--cpp-standard 14
build-docs
- name: Setup Pages
if: ${{ github.event_name != 'pull_request' }}
uses: actions/configure-pages@v3
- name: Upload docs
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@v1
with:
path: "build/suites/docs/html/"
- name: upload-pr-docs
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: pr-docs
path: "build/suites/docs/html/"
if-no-files-found: error
sonarqube:
needs:
- verification
- docs
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts22.4.3
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis by sonarqube.
- name: Install sonar-scanner
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Cache ext modules
id: cetlvast-ext
uses: actions/cache@v3
env:
cache-name: cetlvast-ext-cache
with:
path: cetlvast/build_external
key: gtest_b796f7d44681514f58a683a3a71ff17c94edb0c1
- uses: actions/download-artifact@v3
with:
name: Coverage-no-exceptions-14-gcc
path: build
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
sonar-scanner
--define sonar.organization=opencyphal
--define sonar.projectKey=OpenCyphal_CETL
--define sonar.projectName=CETLVaSt
--define sonar.projectVersion=1.0
--define sonar.sources=include,cetlvast/suites/unittest/sonar.cpp
--define sonar.tests=cetlvast/suites/unittest,cetlvast/suites/docs/examples
--define sonar.test.inclusions=test_*.cpp,example_*.cpp
--define sonar.sourceEncoding=UTF-8
--define sonar.host.url=https://sonarcloud.io
--define sonar.cfamily.ignoreHeaderComments=false
--define sonar.coverage.exclusions="cetlvast/suites/unittest/**/*,cetlvast/suites/docs/examples/**/*,**/sonar.cpp"
--define sonar.cpd.exclusions="cetlvast/suites/unittest/**/*,cetlvast/suites/docs/examples/**/*,**/sonar.cpp"
--define sonar.cfamily.compile-commands="build/compile_commands.json"
--define sonar.cfamily.reportingCppStandardOverride=c++14
--define sonar.coverageReportPaths="build/suites/unittest/coverage.xml,build/suites/docs/examples/coverage.xml"
--define sonar.testExecutionReportPaths="build/suites/unittest/unittest-sonarqube.xml,build/suites/docs/examples/examples-sonarqube.xml"
deploy-docs:
if: ${{ (github.event_name == 'release' && !github.event.release.prerelease) || github.event_name == 'workflow_dispatch' }}
needs:
- sonarqube
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1