diff --git a/.github/workflows/macOS_gcc10.yml b/.github/workflows/macOS_gcc10.yml index 01c990527dc..01070d00ce0 100644 --- a/.github/workflows/macOS_gcc10.yml +++ b/.github/workflows/macOS_gcc10.yml @@ -91,12 +91,12 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " - 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 @@ -104,6 +104,5 @@ jobs: # 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 diff --git a/doc/news/_preparation_next_release.md b/doc/news/_preparation_next_release.md index 773d6f38ab4..a7437b19cd3 100644 --- a/doc/news/_preparation_next_release.md +++ b/doc/news/_preparation_next_release.md @@ -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. @@ -238,7 +238,8 @@ you up to date with the multi-language support provided by Elektra. ## Scripts -- <> +- We fixed the (possibly) infinitely running function `generate-random-string` in [check-env-dep](../../scripts/check-env-dep). + _(René Schwaiger)_ - <> - <> @@ -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ć)_ - <> +### 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)_ diff --git a/doc/todo/NEWS.md b/doc/todo/NEWS.md index 37acd6ff2e6..9c7e9b672ba 100644 --- a/doc/todo/NEWS.md +++ b/doc/todo/NEWS.md @@ -152,6 +152,12 @@ you up to date with the multi-language support provided by Elektra. - <> - <> +### GitHub Actions + +- <> +- <> +- <> + ### Jenkins - <> diff --git a/scripts/check-env-dep b/scripts/check-env-dep index 2190a02ca64..626bf8ce57d 100755 --- a/scripts/check-env-dep +++ b/scripts/check-env-dep @@ -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 diff --git a/tests/shell/check_oclint.sh b/tests/shell/check_oclint.sh index 76d2ddd6bfa..71a413b3e49 100755 --- a/tests/shell/check_oclint.sh +++ b/tests/shell/check_oclint.sh @@ -14,8 +14,7 @@ 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" \ @@ -23,9 +22,20 @@ oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-an "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