Skip to content
Snippets Groups Projects
Commit 5736f0aa authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add first draft of CI pipeline

parent 5cdca6d0
No related branches found
No related tags found
No related merge requests found
stages:
- build-and-test
build-and-test:
stage: build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/meta/axii:latest-bionic
cache:
# https://docs.gitlab.com/ee/ci/caching/#share-caches-across-jobs-in-different-branches
key: one-key-to-rule-them-all
paths:
- .ccache
before_script:
# Ccache configuration and introspection.
- apt-get install ccache --yes
- ccache --set-config=cache_dir="$CI_PROJECT_DIR/.ccache"
- ccache --max-size=20G
- ccache --show-stats
# Activate Axii.
- source /axii/scripts/install_axii.sh
script:
# Create workspace.
- axii workspace create ~/workspace workspace
- axii workspace activate workspace
- _axii_auto_env_refresh
# Use workspace configuration from project.
- cp "$CI_PROJECT_DIR/.gitlab/ci/workspace.json" "$ARMARX_WORKSPACE/armarx-workspace.json"
- cat "$ARMARX_WORKSPACE/armarx-workspace.json"
- axii workspace env
- _axii_auto_env_refresh
- echo "Workspace information:"
- axii workspace list-modules
- axii workspace list-modules --deps
- axii workspace info
# Symlink project directory into Axii workspace.
- mkdir -p "$(dirname $armarx__meta__documentation__PATH)"
- ln -s "$CI_PROJECT_DIR" "$armarx__meta__documentation__PATH"
# Upgrade.
- axii workspace system --accept-apt-install
- axii workspace update --prefer-https
- _axii_auto_env_refresh
# Upgrade.
- axii workspace upgrade
- _axii_auto_env_refresh
- ccache --show-stats
# Test.
# ToDo: Add and use `axii ws test -m simox`
- cd "$simox__PATH/build"
- ctest .
{
"modules": {
"tools/ccache/default": {},
"simox": {}
},
"global": {
"prepare": {
"cmake": {
"definitions": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "$CCACHE",
"CMAKE_CXX_COMPILER_LAUNCHER": "$CCACHE"
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment