Skip to content

Commit

Permalink
iox-eclipse-iceoryx#409 optimize iceoryx build for axivion scan
Browse files Browse the repository at this point in the history
Signed-off-by: Dietrich Krönke <dietrich.kroenke@apex.ai>
  • Loading branch information
dkroenke committed Apr 28, 2021
1 parent 04896a3 commit 70fcdba
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 20 deletions.
92 changes: 72 additions & 20 deletions tools/axivion/axivion_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1282,10 +1282,13 @@
"_active": true
},
"CloneDetection": {
"_active": true
},
"CodingStyle-NoTrailingWhitespace": {
"_active": true
"_active": true,
"excludes": [
"build/*"
],
"pre_excludes": [
"build/*"
]
},
"CycleDetection-CallgraphCycles": {
"_active": true
Expand All @@ -1296,9 +1299,6 @@
"DeadCodeDetection": {
"_active": true
},
"FaultDetection": {
"_active": true
},
"FaultDetection-BadEnumValue": {
"_active": true
},
Expand Down Expand Up @@ -1609,29 +1609,48 @@
"AxivionLinker": {
"_active": true,
"input_files": [
"build/install/prefix/bin/iox-ex-publisher",
"build/install/prefix/bin/iox-ex-subscriber",
"build/install/prefix/bin/iox-c-publisher",
"build/install/prefix/bin/iox-c-subscriber",
"build/install/prefix/bin/iox-roudi"
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-cpp-publisher",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-cpp-subscriber",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-c-publisher",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-c-subscriber",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-cpp-waitset-individual",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-c-waitset-individual",
"$(ICEORYX_DIR)/build/install/prefix/bin/iox-roudi"
],
"ir": "result.ir",
"options": "-j -I2000 -i2000"
},
"BuildSystemIntegration": {
"child_order": [
"Pin All Sources",
"Create Build Directory",
"Command",
"cmake dependencies",
"cmake build",
"AxivionLinker",
"Remove Build Directory",
"Unpin All Sources",
"AxivionLinker"
"AxivionCompiler"
]
},
"Command": {
"_active": true,
"_active": false,
"build_command": "./tools/iceoryx_build_test.sh examples dds-gateway clean",
"clean_command": null,
"environment": {
"CC": "irCC",
"CMAKE_COLOR_MAKEFILE": "OFF",
"CXX": "irCXX"
}
},
"Create Build Directory": {
"_active": true,
"_copy_from": "Command",
"build_command": "mkdir -p build",
"clean_command": null,
"environment": {
"CC": "irCC",
"CMAKE_COLOR_MAKEFILE": "OFF",
"CXX": "irCXX"
}
},
Expand All @@ -1640,7 +1659,7 @@
"sourceserver_gitdir": "$(AXIVION_DATABASES_DIR)/git/iceoryx.git"
},
"Pin All Sources": {
"_active": true,
"_active": false,
"_copy_from": "Command",
"build_command": "srcCP --patch-inplace ."
},
Expand All @@ -1649,22 +1668,55 @@
"multi_binary": true
},
"ci_mode": {
"clean_after": true,
"clean_before": true
"clean_after": false,
"clean_before": false
},
"directory": "../../",
"directory": "$(ICEORYX_DIR)",
"ir": "result.ir",
"name": "iceoryx"
},
"Remove Build Directory": {
"_active": true,
"_copy_from": "Command",
"build_command": null,
"clean_command": "rm -rf build",
"environment": {
"CC": "irCC",
"CMAKE_COLOR_MAKEFILE": "OFF",
"CXX": "irCXX"
}
},
"Shadow": {
"_active": false,
"_active": true,
"shadow_directory": "$(AXIVION_DATABASES_DIR)/shadow/iceoryx",
"sourceserver_repository": "$(AXIVION_DATABASES_DIR)/shadow/iceoryx/shadow.fossil"
},
"Unpin All Sources": {
"_active": true,
"_active": false,
"_copy_from": "Command",
"clean_command": "srcCP --revert ."
},
"cmake build": {
"_active": true,
"_copy_from": "Command",
"build_command": "cmake --build . --target install -- -j$(NUM_PROCESSES=1)",
"clean_command": null,
"cwd": "build",
"environment": {
"COMPILE_ONLYIR": "Yes"
}
},
"cmake dependencies": {
"_active": true,
"_copy_from": "Command",
"build_command": "cmake -DCMAKE_BUILD_TYPE= -DCMAKE_INSTALL_PREFIX=$(ICEORYX_DIR)/build/install/prefix/ -DEXAMPLES=ON -DDDS_GATEWAY=ON $(ICEORYX_DIR)/iceoryx_meta",
"clean_command": null,
"cwd": "build",
"environment": {
"CC": "irCC",
"COMPILE_ONLY": "Yes",
"CXX": "irCXX"
}
}
},
"Results": {
Expand Down
39 changes: 39 additions & 0 deletions tools/axivion/axivion_local_scan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
set -e

ICEORYX_DIR=$(git rev-parse --show-toplevel)
export ICEORYX_DIR
HOST_HOSTNAME="localhost"

source /opt/axivion_bauhaus/bauhaus-kshrc
confdir="$(dirname "$(readlink -f "$ICEORYX_DIR")")"
confdir="$confdir"/iceoryx/tools/axivion
export BAUHAUS_CONFIG="$confdir"
export NUM_PROCESSES=$(nproc)

if [[ ! -d "$ICEORYX_DIR/axivion_results" ]]; then
mkdir -p $ICEORYX_DIR/axivion_results
else
export AXIVION_LOCAL_BUILD=1
fi

export AXIVION_DATABASES_DIR="$(realpath "$ICEORYX_DIR/axivion_results")"
export AXIVION_DASHBOARD_URL="http://localhost/axivion"


gccsetup --gcc gcc --g++ g++ "$confdir"
bauhaus_config \
--add /cafeCC/Frontend/C/Compiler/Options/std_position_format=--std_position_format \
--add /cafeCC/Frontend/C++/Compiler/Options/std_position_format=--std_position_format \
--add /cafeCC/Frontend/Linker/Options/jott=-j \
--add /cafeCC/Frontend/Linker/Options/kleinI=-i2 \
--add /cafeCC/Frontend/Linker/Options/sg=--separate_groups \
--add /cafeCC/Frontend/Linker/Options/grossI=-I2000 \
--add /cafeCC/Frontend/Linker/Options/unused=--include_unused \
"$confdir"

pushd $ICEORYX_DIR
export AXIVION_VERSION_NAME="$(git describe --always --abbrev=1 --tags 2>/dev/null)"
popd

axivion_ci -j --verbose

0 comments on commit 70fcdba

Please sign in to comment.