Skip to content

Commit

Permalink
Merge pull request #9 from andreondra/repo-root-cleanup
Browse files Browse the repository at this point in the history
Cleanup of repository root
  • Loading branch information
pavelpolach321 authored Jan 28, 2025
2 parents 4dde399 + b425876 commit f9ab024
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
uses: whisperity/codechecker-analysis-action@v1
id: codechecker
with:
config: ./codechecker_config.json
build-command: ./codechecker_build.sh
config: ./scripts/codechecker/codechecker_config.json
build-command: ./scripts/codechecker/codechecker_build.sh

- name: Upload results artifacts
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4.1.7

- name: Set Ceedling config path
run: echo "CEEDLING_MAIN_PROJECT_FILE=scripts/ceedling.yml" >>$GITHUB_ENV

- name: Run Ceedling Unit Tests
uses: pavelpolach321/action-ceedling-unit-test@2.0.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ run_ceedling_tests:
script:
- source setup_env
- rm -rf build/
- ceedling gcov:all utils:gcov
- CEEDLING_MAIN_PROJECT_FILE=scripts/ceedling.yml ceedling gcov:all utils:gcov

coverage: '/^TOTAL.*\s+(\d+\%)$/'

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For more info about TROPIC01 check datasheet and API pdf.
* `examples/` A few examples how libtropic might be used
* `hal/` Support code for various platforms - transport layer, delay function and RNG
* `include/` Public API header files
* `scripts/` Build and config scripts
* `src/` Library's source files
* `tests/` Unit tests and integration tests
* `vendor/` Third party libraries and tools
Expand Down
6 changes: 0 additions & 6 deletions codechecker_config.json

This file was deleted.

10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ Unit tests files are in `tests/unit/` folder. They are written in [Ceedling](htt
```

Then make sure that you have correct version:

```
$ ceedling version
Ceedling:: 0.31.1
Expand All @@ -114,11 +113,12 @@ $ ceedling version
CException:: 1.3.3
```
For now we support Ceedling version 0.31.1 only.

Once ceedling is installed, run tests and create code coverage report:

```
$ ceedling gcov:all utils:gcov
$ CEEDLING_MAIN_PROJECT_FILE=scripts/ceedling.yml ceedling gcov:all utils:gcov
```

### Randomization
Expand All @@ -144,16 +144,16 @@ There are 3 options how to get reports:
2. Generate HTML report yourself.
- You need to install CodeChecker (e.g. via pip). After that, run:
```sh
CodeChecker check -b "./codechecker_build.sh" --config ./codechecker_config.json --output ./.codechecker/reports
CodeChecker check -b "./scripts/codechecker/codechecker_build.sh" --config ./scripts/codechecker/codechecker_config.json --output ./.codechecker/reports
CodeChecker parse -e html ./.codechecker/reports -o ./.codechecker/reports_html
```
- Open `./.codechecker/reports_html/index.html` in your browser.
3. Use CodeChecker add-on.
- Add these lines to your VS Code's workspace settings (`.vscode/settings.json`):
```json
"codechecker.executor.executablePath": <path to CodeChecker>,
"codechecker.executor.arguments": "--config codechecker_config.json",
"codechecker.executor.logBuildCommand": "./codechecker_build.sh",
"codechecker.executor.arguments": "--config scripts/codechecker/codechecker_config.json",
"codechecker.executor.logBuildCommand": "./scripts/codechecker/codechecker_build.sh",
"codechecker.backend.compilationDatabasePath": "${workspaceFolder}/.codechecker/compile_commands.json"
```
- `<path to CodeChecker>` can be replaced with "CodeChecker" if the CodeChecker is available in your `$PATH`. Otherwise, you need to specify full path to the CodeChecker executable.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions scripts/codechecker/codechecker_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"analyze": [
"--enable=security",
"--skip=./scripts/codechecker/codechecker.skip"
]
}

0 comments on commit f9ab024

Please sign in to comment.