Skip to content

Commit

Permalink
Merge pull request #9 from Elektrobit/next
Browse files Browse the repository at this point in the history
Next
Update to 58.2
  • Loading branch information
gehwolf authored Aug 15, 2024
2 parents 1ad81f9 + 98d8277 commit 77bdd2d
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 30 deletions.
4 changes: 3 additions & 1 deletion ci/create_debian_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function setup_env() {

git config --local user.name "${GIT_AUTHOR_NAME}"
git config --local user.email "${GIT_AUTHOR_EMAIL}"

export SAFU_DEPENDENCY_CONFIG=./ci/dependencies_emlix.json
}

function create_and_publish_debian_main() {
Expand All @@ -32,7 +34,7 @@ function create_and_publish_debian_main() {
rm debian/README.md
echo "3.0 (quilt)" > debian/source/format

dch -M "--newversion=${NEW_VERSION}-1" "New upstream tag ${NEW_VERSION}"
dch -M -D unstable --newversion="${NEW_VERSION}-1" "New upstream tag ${NEW_VERSION}"
git add debian/ && git commit -m "New upstream tag ${NEW_VERSION}"
git checkout HEAD -- debian.native && git clean -fxd -- debian.native
}
Expand Down
1 change: 1 addition & 0 deletions ci/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ and call `install_deps.py` like :
SOURCES_URI=https://${GIT_USER_TOKEN}@github.com/Elektrobit/
These dependencies get installed into `build/deps/` and if provided with an URL the sources can be found in `build/deps/src`.
To use binaries installed from dependencies add `build/deps/bin` to the `PATH` environment variable.

`ci/build.sh`
-------------
Expand Down
12 changes: 12 additions & 0 deletions cmake/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@ CMake options
.. program-output:: cmake -LH 2>/dev/null | sed '0,/^-- Cache values$/d'
:shell:


Usage of find_package
=====================

* Always specify a version. `find_package(dependecy X.Y.Z REQUIRED)`
* Specify the version used for development


* The version doesn't guarantee that in the future the build still works with this version.
* The version does not necessarily say the previous versions will not work.
* The version is just an indicator for later issue or bug tracking, to say: "It was developed with this version and it worked".
* Usually we always build against the latest available version of our dependencies, so we only can guarantee that the latest upstream version will work.
2 changes: 1 addition & 1 deletion cmake/project.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
set(SAFU_VERSION 0.56.2)
set(SAFU_VERSION 0.58.2)

# Attention: Aside from the version, as many things as possible in this file
# should be put into functions, as this solves potential issues with commands
Expand Down
6 changes: 4 additions & 2 deletions debian.native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ should be added to a new `.install` file matching the name of the new package.

To prepare a new release on `debian/main` run
1. `git checkout -b <task/-new-release> origin/debian/main`
2. `./ci/docker-run.sh ./ci/create_debian_release.sh <x.y.z>`
3. push branch and create MR for **debian/main** , not *main* and not *integration*!
2. ensure to set `SOURCE_URI` to a repo containing the latest debian releases
of the dependency projects
3. `./ci/docker-run.sh ./ci/create_debian_release.sh <x.y.z>`
4. push branch and create MR for **debian/main** , not *main* and not *integration*!

## Packaging Script Maintainer

Expand Down
2 changes: 1 addition & 1 deletion src/safu/public/safu/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ safuLogStatusE_t safuLogFuncF(safuLogLevelE_t level, const char *file, const cha
safuLogStatusE_t safuLogFunc(safuLogLevelE_t level, const char *file, const char *func, unsigned int line,
const char *fmt) __attribute__((__format__(__printf__, 5, 0)));

__BEGIN_DECLS
__END_DECLS

#define safuLogCrit(__message) safuLogFunc(SAFU_LOG_LEVEL_CRIT, __FILE__, __func__, __LINE__, __message)
#define safuLogCritF(__message, ...) \
Expand Down
2 changes: 1 addition & 1 deletion test/utest/mocks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
include(create_mock_lib.cmake)
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_mock_lib(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/mocks/safu/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@PACKAGE_INIT@
find_package(safu REQUIRED)
find_package(safu 0.56.2 REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/mock_safuTargets.cmake")
2 changes: 1 addition & 1 deletion test/utest/safu/common/safuAllocMem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/common/safuGetEnvOr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/common/safuStringIsEmpty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewArray/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewInt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewInt64/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewObject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewString/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddNewUint64/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonAddObject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetInt32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetInt64/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetObject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetString/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetUint32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/json/safuJsonGetUint64/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/time/safuTimeGetLocalTime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/vector/safuVecCreate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/vector/safuVecInsert/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
2 changes: 1 addition & 1 deletion test/utest/safu/vector/safuVecPush/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
find_package(cmocka_mocks)
find_package(cmocka_mocks 0.54.2 REQUIRED)

create_unit_test(
NAME
Expand Down
4 changes: 2 additions & 2 deletions test/utest/unit_test.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
if(NOT CMAKE_CROSSCOMPILING)
find_package(cmocka 1.1.5)
find_package(cmocka 1.1.5 REQUIRED)
# get cmocka
if(NOT cmocka_FOUND)
message(STATUS "CMocka >=1.1.5 was not found, building static version")
Expand All @@ -10,7 +10,7 @@ if(NOT CMAKE_CROSSCOMPILING)
else()
find_package(cmocka 1.1.5 REQUIRED)
endif()
find_package(cmocka_extensions REQUIRED)
find_package(cmocka_extensions 0.53.1 REQUIRED)

function(create_unit_test)
cmake_parse_arguments(PARSED_ARGS "" "NAME" "SOURCES;INCLUDES;LIBRARIES;DEFINITIONS" ${ARGN})
Expand Down

0 comments on commit 77bdd2d

Please sign in to comment.