Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iox #433 rework build and test tooling #452

Merged
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4f2193b
iox-#433 update version number
dkroenke Dec 16, 2020
6ce9f98
iox-#433 cmake options in an own file
dkroenke Dec 16, 2020
d272b88
Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 17, 2020
65ac167
iox-#433 set correct version number
dkroenke Dec 17, 2020
0e80641
iox-#433 extend dds docu
dkroenke Dec 17, 2020
79f17ac
iox-#433 remove zero from iceoryx
dkroenke Dec 17, 2020
1dc0508
iox-#433 remove componenttests and create test targets
dkroenke Dec 17, 2020
5beeaed
iox-#433 rework build flags
dkroenke Dec 17, 2020
7aebe58
iox-#433 remove python script
dkroenke Dec 17, 2020
46edd87
iox-#433 update Dockerfile and readme
FerdinandSpitzschnueffler Dec 18, 2020
af263f2
iox-#433 out-of-tree build
dkroenke Dec 18, 2020
e821d5f
Merge branch 'iox-#433-rework-build-test-tooling' of https://github.c…
dkroenke Dec 18, 2020
d67892d
iox-#433 adapt Github workflows
dkroenke Dec 18, 2020
28804e2
iox-#433 harmonize job names in github
dkroenke Dec 18, 2020
8bf5525
Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 18, 2020
4471ad2
iox-#433 add clang-tidy build option
dkroenke Dec 18, 2020
8bb1bcf
iox-#433 compile_command.json in cmake
dkroenke Dec 18, 2020
d341ed9
iox-#433 add test docu
dkroenke Dec 18, 2020
b700b45
iox-#433 add sanitizer flags
dkroenke Dec 18, 2020
ccdb596
iox-#433 set optimization to -O2
dkroenke Dec 19, 2020
6343d13
iox-#433 clean up compile warnings
dkroenke Dec 19, 2020
18e9baf
iox-#433 rework coverage scan
dkroenke Dec 19, 2020
f34deaf
iox-#433 add optimizations to tests
dkroenke Dec 19, 2020
b7a036b
iox-#433 add copyright header to cmake files
dkroenke Dec 19, 2020
63ad081
Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 19, 2020
331c2d8
iox-#433 adapt out-of-tree build
dkroenke Dec 19, 2020
55c2b50
iox-#433 remove pragma for GCC-9
dkroenke Dec 19, 2020
83b3d7d
iox-#433 fixups
dkroenke Dec 19, 2020
b1c151c
iox-#433 asan scan fixed
dkroenke Dec 19, 2020
75d4ef1
iox-#433 PortUser_IntegrationTest as TimingTest
dkroenke Dec 19, 2020
8298068
iox-#433 add missing U
dkroenke Dec 21, 2020
a27c740
iox-#433 rework docu findings
dkroenke Dec 21, 2020
3de6245
iox-#433 optimization level to -O0 remove -j flag from build script
dkroenke Dec 21, 2020
eb0fafd
iox-#433 Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 21, 2020
cd025b3
iox-#433 fixes in docu and build script
dkroenke Dec 21, 2020
d89ccab
iox-#433 build iceperf with c-binding only
dkroenke Dec 21, 2020
40a5001
iox-#433 example flag
dkroenke Dec 21, 2020
1c6537a
iox-#433 remove Optimize Option
dkroenke Dec 21, 2020
16d26dd
iox-#433 add links to Readme.md
dkroenke Dec 21, 2020
b26d660
iox-#433 Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 21, 2020
28eebe2
iox-#433 cleanup workflows
dkroenke Dec 21, 2020
8d1cdfe
iox-#433 fix iceperf build
dkroenke Dec 21, 2020
eec4bf1
iox-#433 add whitespace
dkroenke Dec 21, 2020
c1d62ab
iox-#433 use macos latest in workflows
dkroenke Dec 21, 2020
3ec3d35
iox-#433 remove whitespaces
dkroenke Dec 21, 2020
aae49b6
iox-#433 Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 21, 2020
36e25d3
iox-#433 Buildall on MacOS
dkroenke Dec 21, 2020
e258ce2
iox-#433 install boost on MacOS
dkroenke Dec 21, 2020
f226535
iox-#433 rework script arguments
dkroenke Dec 21, 2020
ac63aad
iox-#433 fix c&p mistake
dkroenke Dec 21, 2020
3fde9af
iox-#433 build cyclonedds-cxx with c++11
dkroenke Dec 21, 2020
b66a04c
iox-#433 build adapt structs for c-binding
dkroenke Dec 21, 2020
a7603ac
iox-#433 fix tests in c-binding
dkroenke Dec 21, 2020
25e5a23
iox-#433 build with c++11 on apple
dkroenke Dec 21, 2020
39d341c
iox-#433 update cycloneDDS
dkroenke Dec 21, 2020
6077fcd
iox-#433 whitespace and introspection version
dkroenke Dec 21, 2020
171a8e9
iox-#433 asan docu
dkroenke Dec 22, 2020
1cb97a3
iox-#433 disable leaksan on CI
dkroenke Dec 22, 2020
fef7f17
Merge branch 'master' into iox-#433-rework-build-test-tooling
dkroenke Dec 22, 2020
4d7a07b
iox-#433 revert changes on semaphore
dkroenke Dec 22, 2020
ed13d34
iox-#433 revert changes on mutex
dkroenke Dec 22, 2020
f5a7587
iox-#433 cleanup endif() in cmake
dkroenke Dec 22, 2020
953226e
iox-#433 adapt copyright header
dkroenke Dec 22, 2020
9ef17f9
iox-#433 Fix GCC 9 warning in MemPoolInstrospection
elBoberido Dec 22, 2020
06ddb03
iox-#433 cleanup buildflags
dkroenke Dec 22, 2020
bfed334
iox-#433 Remove Trigger_test from asan blacklist
elBoberido Dec 22, 2020
7e78521
iox-#433 readme fixup
dkroenke Dec 22, 2020
3dd0643
Merge branch 'iox-#433-rework-build-test-tooling' of https://github.c…
dkroenke Dec 22, 2020
e40170f
iox-#433 Fix Trigger_test and adjust Trigger move assignment
elBoberido Dec 22, 2020
af57383
iox-#433 add flags to examples
dkroenke Dec 22, 2020
48f7ce0
Merge branch 'iox-#433-rework-build-test-tooling' of https://github.c…
dkroenke Dec 22, 2020
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
50 changes: 13 additions & 37 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This job builds & runs iceoryx tests in ubuntu-18.04
ubuntu-iceoryx-meta:
dkroenke marked this conversation as resolved.
Show resolved Hide resolved
iceoryx-ubuntu:
# The type of runner that the job will run on
runs-on: ubuntu-18.04

Expand All @@ -23,60 +23,35 @@ jobs:
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
run: sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev

- name : Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Build sources
run: |
export NUM_CORES=`nproc`
cmake -Bbuild -Hiceoryx_meta -Dtest=ON -Dbinding_c=ON -Dexamples=ON -Dintrospection=ON && cmake --build build -j$NUM_CORES
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all out-of-tree

- name: Run timeless tests
run: |
cd $GITHUB_WORKSPACE/build
make tests
make all_tests

- name: Run timing tests
run: |
cd $GITHUB_WORKSPACE/build
make timing_tests

ubuntu-build-script:
# The type of runner that the job will run on
runs-on: ubuntu-18.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install iceoryx dependencies
# Softwares installed in ubuntu-18.04 instance
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
run: sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev

- name : Checkout
uses: actions/checkout@v2

- name: Build sources
run: |
export NUM_CORES=`nproc`
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-test with-dds-gateway clean strict -j $NUM_CORES

- name: Run tests
run: |
cd $GITHUB_WORKSPACE/build
../tools/run_all_tests.sh

# This job builds & runs iceoryx tests in macos-10.15
macos-build-script:
runs-on: macos-10.15
iceoryx-macos:
runs-on: macos-latest
# Softwares installed in macos-10.15 instance
# https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name : Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Build ncurses from source
- name: Build and install dependencies
# tinfo library which is required by iceoryx_introspection isn't available in mac
run: |
cd $GITHUB_WORKSPACE
Expand All @@ -90,15 +65,16 @@ jobs:
make install

- name: Build sources
run: $GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-test clean strict
run: |
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all out-of-tree

- name: Run tests
run: |
cd $GITHUB_WORKSPACE/build
../tools/run_all_tests.sh disable-timing-tests
make all_tests

# This job builds & runs iceoryx tests in Windows 2019
windows-iceoryx-meta:
iceoryx-windows:
runs-on: windows-latest
# Softwares installed in windows instance
# https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
Expand All @@ -110,4 +86,4 @@ jobs:

- name: Build sources
run: |
cmake -Bbuild -Hiceoryx_meta -Ddds_gateway=OFF -Dtest=ON -Dbinding_c=ON -Dexamples=ON && cmake --build build
cmake -Bbuild -Hiceoryx_meta -DBUILD_TEST=ON -DINTROSPECTION=OFF -DBINDING_C=ON -DEXAMPLES=ON && cmake --build build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This job builds & runs iceoryx tests in ubuntu-18.04
build-test-ubuntu:
iceoryx-coverage-ubuntu:
# The type of runner that the job will run on
runs-on: ubuntu-18.04

Expand All @@ -28,9 +28,8 @@ jobs:

- name: Build, test and generate gcov report
run: |
export NUM_CORES=`nproc`
# add flag to include coverage
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh with-dds-gateway clean strict -j $NUM_CORES -c unit
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict debug build-all out-of-tree -c unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/sanitize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,40 @@ on:
jobs:
clang-sanitize:
# The type of runner that the job will run on
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install iceoryx dependencies
# Softwares installed in ubuntu-18.04 instance
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
# Softwares installed in ubuntu-20.04 instance
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu2004-README.md
run: sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev

- name : Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
export NUM_CORES=`nproc`
# build tests , dont run them
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh clang build-test with-dds-gateway strict sanitize clean -j $NUM_CORES
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all sanitize clang

- name : Run tests
- name: Run tests
run: |
cd $GITHUB_WORKSPACE/build
../tools/run_all_tests.sh
../tools/run_all_tests.sh asan-only

# This job builds & runs iceoryx tests (with sanitizer) in macos-10.15
clang-sanitize-macos:
runs-on: macos-10.15
runs-on: macos-latest
# Softwares installed in macos-10.15 instance
# https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name : Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Build ncurses from source
- name: Build and install dependencies
# tinfo library which is required by iceoryx_introspection isn't available in mac
run: |
cd $GITHUB_WORKSPACE
Expand All @@ -60,12 +59,13 @@ jobs:
make install

- name: Build
run: $GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-test sanitize clean
run: |
$GITHUB_WORKSPACE/tools/iceoryx_build_test.sh build-strict build-all sanitize

- name: Run tests
run: |
cd $GITHUB_WORKSPACE/build
../tools/run_all_tests.sh disable-timing-tests
../tools/run_all_tests.sh asan-only



3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/build*/
build/
build_out_of_tree/
install/
/CMakeLists.txt
.vscode
Expand Down
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The folder structure boils down to:
* include: public headers with stable API
* internal: public headers with unstable API, which might change quite frequently
* source: implementation files
* test: unit and integrations tests
* test: unit and integration tests
* CMakeLists.txt: Build the component separately
* examples_iceoryx: Examples described in [iceoryx_examples](./iceoryx_examples/README.md)

Expand All @@ -139,27 +139,27 @@ Integration tests are composition of more than one class and test their interact

To ensure that the provided testcode covers the productive code you can do a coverage scan with gcov. The reporting is done with lcov and htmlgen.
You will need to install the following packages:
```
sudo apt install lcov
```
```
sudo apt install lcov
```

In iceoryx we have multiple testlevels for testcoverage: 'unit', 'integration', 'component' and ’all’ for all testlevels together. You can create reports for these different testlevels or for all tests. Coverage is done with gcc.
The coverage scan applies to Quality level 3 and partly level 2 with branch coverage.

For having a coverage report iceoryx needs to be compiled with coverage flags and the tests needs to be executed.
You can do this with one command like this:
```
./tools/iceoryx_build_test.sh clean -c <testlevel> -j 4
```

You can do this with one command in iceroyx folder like this:
```
./tools/iceoryx_build_test.sh clean buildall -c <testlevel>
```
Optionally you can use buildall option to get coverage for extensions like DDS or C-Binding.
The -c flag indicates that you want to have a coverage report and you can pass there the needed testlevel. Per default the testlevel is set to 'all'.
example:
```
./tools/iceoryx_build_test.sh clean -c unit -j 4
```
For having only unittest reports. In the script tools/gcov/lcov_generate.sh is the initial scan, filtering and report generation automatically done.
```
./tools/iceoryx_build_test.sh buildall clean -c unit
```
For having only reports for unit-test. In the script tools/gcov/lcov_generate.sh is the initial scan, filtering and report generation automatically done.

All reports are stored in build/lcov as html report.
All reports are stored in build/lcov as html report (index.html).

## Legal & Compliance

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ Please see the dedicated [README.md](tools/docker/README.md) for information on

## Documentation

* [Getting Started](doc/website/getting-started/overview.md)
* [Installation Guide](doc/website/getting-started/installation.md)
* [Concepts](doc/conceptual-guide.md)
* [Usage Guide](doc/usage-guide.md)
* [Ice0ryx Utils Hacker Guide](iceoryx_utils/README.md)
* [Iceoryx Utils Hacker Guide](iceoryx_utils/README.md)

### Targeted quality levels & platforms

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.0.2
0.90.0.0
15 changes: 15 additions & 0 deletions cmake/cpptoml/cpptoml.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

cmake_minimum_required(VERSION 3.5)

project(cpptoml-download NONE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/cyclonedds/cyclonedds-cxx.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ project(cyclonedds-cxx-download NONE)
include(ExternalProject)
ExternalProject_Add(ext_cyclonedds_cxx
GIT_REPOSITORY https://github.com/eclipse-cyclonedds/cyclonedds-cxx.git
GIT_TAG ad1154afc6f14b43d37f5bfc4c6995c9c59ffeb3
GIT_TAG a7285c9d10d2da223d5a2fb8c9c04e591bcb3627
SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cyclonedds-cxx/src"
BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cyclonedds-cxx/build"
CONFIGURE_COMMAND ""
Expand Down
2 changes: 1 addition & 1 deletion cmake/cyclonedds/cyclonedds.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ project(cyclonedds-download NONE)
include(ExternalProject)
ExternalProject_Add(ext_cyclonedds
GIT_REPOSITORY https://github.com/eclipse-cyclonedds/cyclonedds.git
GIT_TAG 0.6.0
GIT_TAG 0.7.0
SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/cyclonedds/src"
BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/cyclonedds/build"
CONFIGURE_COMMAND ""
Expand Down
4 changes: 2 additions & 2 deletions cmake/googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
cmake_minimum_required(VERSION 3.5)
project(googletest-build CXX)

if(test)
if(BUILD_TEST)

include(ProcessorCount)
ProcessorCount(N)
Expand Down Expand Up @@ -73,4 +73,4 @@ if(test)
list(APPEND CMAKE_PREFIX_PATH ${INSTALL_DIR})
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE INTERNAL "" FORCE)

endif(test)
endif(BUILD_TEST)
15 changes: 15 additions & 0 deletions cmake/googletest/googletest.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

cmake_minimum_required(VERSION 3.5)

project(googletest-download NONE)
Expand Down
15 changes: 15 additions & 0 deletions cpptoml_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

cmake_minimum_required(VERSION 3.5)
project(cpptoml_vendor)

Expand Down
15 changes: 15 additions & 0 deletions cpptoml_vendor/cpptoml_vendorConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# include cpptoml config file to make find_package(cpptoml REQUIRED) work

include(${CMAKE_CURRENT_LIST_DIR}/../../cpptoml_install/lib/cmake/cpptoml/cpptomlConfig.cmake)
15 changes: 15 additions & 0 deletions cpptoml_vendor/cpptoml_vendorConfigVersion.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set(PACKAGE_VERSION "@cpptoml_vendor_VERSION@")

# Check whether the requested PACKAGE_FIND_VERSION is compatible
Expand Down
Loading