Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ updates:
ignore:
- dependency-name: "actions/*"
update-types: ["version-update:semver-patch"]
groups:
github-actions:
patterns:
- "*"
69 changes: 13 additions & 56 deletions .github/workflows/cetlvast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Cache ext modules
id: cetlvast-ext
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: cetlvast/build_external
key: build-external-${{ hashFiles('**/cetlvast/cmake/modules/ExternalDependencies*.cmake.in') }}-${{ hashFiles('**/cetlvast/cmake/modules/patches/*.patch') }}
Expand All @@ -52,9 +52,9 @@ jobs:
toolchain: ["gcc-native-32", "clang-native"]
standard: ["cpp-14", "cpp-17", "cpp-20", "cpp-23"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Cache ext modules
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: cetlvast/build_external
key: build-external-${{ hashFiles('**/cetlvast/cmake/modules/ExternalDependencies*.cmake.in') }}-${{ hashFiles('**/cetlvast/cmake/modules/patches/*.patch') }}
Expand All @@ -66,13 +66,11 @@ jobs:
run: >
cmake --workflow --preset workflow-${{ matrix.toolchain }}-${{ matrix.standard }}-offline
- name: upload-artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.toolchain }}-${{ matrix.standard }}-amd64
path: |
cetlvast/build/compile_commands.json
cetlvast/build/*/**/coverage.xml
cetlvast/build/*/**/*-sonarqube.xml
cetlvast/build/*/**/gcovr_html/*.*
if-no-files-found: error

Expand All @@ -93,9 +91,9 @@ jobs:
toolchain: ["gcc-native", "clang-native"]
standard: ["cpp-14", "cpp-17", "cpp-20"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Cache ext modules
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: cetlvast/build_external
key: build-external-${{ hashFiles('**/cetlvast/cmake/modules/ExternalDependencies*.cmake.in') }}-${{ hashFiles('**/cetlvast/cmake/modules/patches/*.patch') }}
Expand All @@ -107,13 +105,11 @@ jobs:
run: >
cmake --workflow --preset workflow-${{ matrix.toolchain }}-${{ matrix.standard }}-offline
- name: upload-artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.toolchain }}-${{ matrix.standard }}-arm64
path: |
cetlvast/build/compile_commands.json
cetlvast/build/*/**/coverage.xml
cetlvast/build/*/**/*-sonarqube.xml
cetlvast/build/*/**/gcovr_html/*.*
if-no-files-found: error

Expand All @@ -130,9 +126,9 @@ jobs:
needs:
- cache-warmup
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Cache ext modules
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: cetlvast/build_external
key: build-external-${{ hashFiles('**/cetlvast/cmake/modules/ExternalDependencies*.cmake.in') }}-${{ hashFiles('**/cetlvast/cmake/modules/patches/*.patch') }}
Expand All @@ -145,57 +141,18 @@ jobs:
run: ninja docs
- name: Setup Pages
if: ${{ github.event_name != 'pull_request' }}
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6
- name: Upload docs
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: "cetlvast/build/suites/docs/html/"

sonarqube:
if: >
(github.event_name == 'release' && !github.event.release.prerelease) ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.head_commit.message, '#sonar') ||
contains(github.ref, '/main') ||
contains(github.ref, '/issue/') ||
(github.event_name == 'pull_request')
needs:
- cache-warmup
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts24.4.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis by sonarqube.
- name: Cache ext modules
uses: actions/cache@v4
with:
path: cetlvast/build_external
key: build-external-${{ hashFiles('**/cetlvast/cmake/modules/ExternalDependencies*.cmake.in') }}-${{ hashFiles('**/cetlvast/cmake/modules/patches/*.patch') }}
fail-on-cache-miss: true
- name: Check for SONAR_TOKEN
if: ${{ env.SONAR_TOKEN == '' && github.event_name == 'pull_request' }}
run: echo "::notice file=cetlvast.yml,line=188,col=8,endColumn=80,title=No-Sonar::SONAR_TOKEN is not available for pull requests from external repositories."
- name: Check for SONAR_TOKEN
if: ${{ env.SONAR_TOKEN == '' && github.event_name != 'pull_request' }}
run: echo "::error file=cetlvast.yml,line=191,col=8,endColumn=80,title=SONAR_TOKEN-missing::SONAR_TOKEN was empty or not found."
- name: Run build for sonar-scanner
if: ${{ env.SONAR_TOKEN != '' }}
working-directory: cetlvast
run: cmake --workflow --preset manual-coverage-gcc-native-cpp-14-offline
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.3.1
if: ${{ env.SONAR_TOKEN != '' }}
deploy-docs:
if: >
(github.event_name == 'release' && !github.event.release.prerelease) ||
github.event_name == 'workflow_dispatch'
needs:
- sonarqube
- docs
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand All @@ -213,4 +170,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -51,7 +51,7 @@ jobs:
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

- name: Cache ext modules
uses: actions/cache@v4
uses: actions/cache@v6
id: cetlvast-ext
with:
path: cetlvast/build_external
Expand All @@ -65,6 +65,6 @@ jobs:
run: cmake --workflow --preset manual-simple-workflow-offline

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"xaver.clang-format",
"vadimcn.vscode-lldb",
"matepek.vscode-catch2-test-adapter",
"sonarsource.sonarlint-vscode",
"llvm-vs-code-extensions.vscode-clangd"
]
}
8 changes: 0 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@
"pattern": "${workspaceFolder}/cetlvast/build/suites/benchmark/**/benchmark_*"
}
],
"sonarlint.pathToCompileCommands": "${workspaceFolder}/cetlvast/build/compile_commands.json",
"sonarlint.connectedMode.project": {
"connectionId": "opencyphal",
"projectKey": "OpenCyphal_CETL"
},
"sonarlint.analyzerProperties": {
"sonar.cfamily.reportingCppStandardOverride": "c++14"
},
"cSpell.allowCompoundWords": true,
"cSpell.caseSensitive": false,
"cSpell.customDictionaries": {
Expand Down
3 changes: 0 additions & 3 deletions .vscode/words-cetl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ NOLINT
NOLINTBEGIN
NOLINTEND
NOLINTNEXTLINE
NOSONAR
NOTFOUND
opencyphal
Pavel
Expand All @@ -42,8 +41,6 @@ pushd
rbegin
regen
rend
sonarcloud
sonarqube
ssep
STREQUAL
subpage
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,10 @@ Often, however, you will want to run it on your branch before proposing the chan
green and test coverage is adequate - to do that:
- either target your PR to any `issue/NN_LABEL` branch, where `NN` is the issue number and `LABEL` is a small title giving context (like `issue/83_any`)
- or add a hashtag with the name of the workflow you need to run to the head commit;
for example, making a commit with a message like `Add feature such and such #verification #docs #sonar`
will force the CI to execute jobs named `verification`, `docs`, and `sonar`.
for example, making a commit with a message like `Add feature such and such #verification #docs`
will force the CI to execute jobs named `verification` and `docs`.

Note that if the job you requested is dependent on other jobs that are not triggered, it will not run;
for example, if `sonar` requires `docs`, pushing a commit with `#sonar` alone will not make it run.
Note that if the job you requested is dependent on other jobs that are not triggered, it will not run.

# IDE-specific notes

Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ Cyphal Embedded Template Library
[![CETLVaSt](https://github.com/OpenCyphal/CETL/actions/workflows/cetlvast.yml/badge.svg)](https://github.com/OpenCyphal/CETL/actions/workflows/cetlvast.yml)
[![Open Bugs](https://img.shields.io/github/issues/OpenCyphal/CETL/bug?label=bugs&logo=github)](https://github.com/OpenCyphal/CETL/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL&metric=coverage)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)


## include

The include directory contains the CETL headers all within a folder, "cetl". Types found under "cetl/pfXX" folders and
Expand Down
2 changes: 0 additions & 2 deletions cetlvast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,8 @@ add_custom_target(
unittest
DEPENDS
run_unittests
$<$<CONFIG:Coverage>:gcovr_sonarqube_report_for_unittest>
$<$<CONFIG:Coverage>:gcovr_html_report_for_unittest>
run_examples
$<$<CONFIG:Coverage>:gcovr_sonarqube_report_for_examples>
$<$<CONFIG:Coverage>:gcovr_html_report_for_examples>
run_compile_precheck_tests
)
Expand Down
Loading
Loading