Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3625 from sanssecours/🔬
Browse files Browse the repository at this point in the history
Minor OCLint & GitHub Actions Update
  • Loading branch information
mpranj authored Jan 10, 2021
2 parents c680d9f + 33aaa86 commit d3868d5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/macOS_gcc10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,18 @@ jobs:
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: ninja
run: cmake --build .

- name: Install
working-directory: ${{runner.workspace}}/build
shell: bash
run: output="$(ninja install 2>&1)" || printf '%s' "$output"
run: output="$(cmake --build . --target install 2>&1)" || printf '%s' "$output"

- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ninja run_all
# `kdb run_all` currently does not work, since `check-env-dep` seems to stall
# See also: https://github.com/sanssecours/elektra/runs/1626437214?check_suite_focus=true
cmake --build . --target run_all
kdb run_all
9 changes: 7 additions & 2 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ There are two places that will still contain the old syntax after the update:
Fixing the first instance is optional.
There the key name is just used to create a unique name for the mountpoint.

The second instance, however, must be fix or Elektra will be unusable.
The second instance, however, must be fixed or Elektra will be unusable.

> **Disclaimer:** We cannot guarantee that the commands below work for all cases.
> We also make no guarantees that the command will not break things.
Expand Down Expand Up @@ -238,7 +238,8 @@ you up to date with the multi-language support provided by Elektra.

## Scripts

- <<TODO>>
- We fixed the (possibly) infinitely running function `generate-random-string` in [check-env-dep](../../scripts/check-env-dep).
_(René Schwaiger)_
- <<TODO>>
- <<TODO>>

Expand Down Expand Up @@ -279,6 +280,10 @@ you up to date with the multi-language support provided by Elektra.
- Upgrade to Ruby 3.0 for macOS builds. _(Mihael Pranjić)_
- <<TODO>>

### GitHub Actions

- We added a build job that translates Elektra with GCC on macOS. _(Mihael Pranjić, René Schwaiger)_

### Jenkins

- We now use Debian sid to build the documentation instead of Debian stretch. The Doxygen version in Debian stretch [contains a bug](https://github.com/doxygen/doxygen/issues/6456) that causes the generation of the PDF documentation to fail. _(René Schwaiger)_
Expand Down
6 changes: 6 additions & 0 deletions doc/todo/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ you up to date with the multi-language support provided by Elektra.
- <<TODO>>
- <<TODO>>

### GitHub Actions

- <<TODO>>
- <<TODO>>
- <<TODO>>

### Jenkins

- <<TODO>>
Expand Down
4 changes: 3 additions & 1 deletion scripts/check-env-dep
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env sh

generate_random_string() {
cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | fold -w 6 | head -n 1
# While this command might not produce 6 pseudo random lower case letters, depending on the content of `/dev/urandom`, it should
# do so most of the time. Even if the output is a shorter string, this should not matter for the purpose of this script.
head /dev/urandom | LC_ALL=C tr -dc 'a-z' | head -c 6
}

if [ -z "$KDB" ]; then
Expand Down
20 changes: 15 additions & 5 deletions tests/shell/check_oclint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,28 @@ test -f "@PROJECT_BINARY_DIR@/compile_commands.json" || {
exit 0
}

cd "@CMAKE_SOURCE_DIR@" || exit
oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-analyzer \
set -- \
"src/libs/ease/array.c" \
"src/libs/ease/keyname.c" \
"src/libs/utility/text.c" \
"src/plugins/base64/"*.c \
"src/plugins/ccode/"*.cpp \
"src/plugins/cpptemplate/"*.cpp \
"src/plugins/directoryvalue/"*.cpp \
"src/plugins/mini/mini.c" \
"src/plugins/yamlcpp/"*.cpp \
"src/plugins/yamlsmith/"*.cpp
"src/plugins/mini/mini.c"

if [ "$(uname -s)" = Darwin ] && [ "$(uname -r | cut -d '.' -f1)" -eq 19 ]; then
printerr 'OCLint does not work on macOS 10.15 if source files use headers that were included using the option `SYSTEM`.\n'
printerr 'The script will therefore *not* check the source files of the YAML CPP and Yan LR plugins.'
else
set -- $@ \
"src/plugins/yamlcpp/"*.cpp \
"src/plugins/yanlr/"*.cpp
fi

cd "@CMAKE_SOURCE_DIR@" || exit
oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-analyzer $@

exit_if_fail "OCLint found problematic code"

end_script

0 comments on commit d3868d5

Please sign in to comment.