1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/fpga/.gitlab-ci.yml
2022-11-17 15:49:10 +01:00

85 lines
2 KiB
YAML

variables:
GIT_SUBMODULE_STRATEGY: recursive
PREFIX: /usr/
DOCKER_TAG_DEV: ${CI_BUILD_REF_SLUG}
DOCKER_IMAGE_DEV: villas/fpga-dev
stages:
- prepare
- build
- test
# Stage: prepare
##############################################################################
# Build docker image which is used to build & test VILLASnode
docker-dev:
stage: prepare
script:
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
tags:
- docker
# Stage: build
##############################################################################
build:source:
stage: build
script:
- mkdir build && cd build && cmake3 .. && make -j8
artifacts:
expire_in: 1 week
name: ${CI_PROJECT_NAME}-${CI_BUILD_REF}
paths:
- build/
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
# Stage: test
##############################################################################
test:unit:
stage: test
tags:
- docker
allow_failure: true
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
script: |
rm -r build && mkdir build && cd build
cmake ..
make -j$(nproc) unit-tests-fpga
if [ "$(who | wc -l)" -eq "0" ]; then
tests/unit/unit-tests-fpga --jobs 1 --filter 'fpga/*'
else
echo "System is currently used by: $(who)"
echo "We are skipping the test. Please restart manually."
fi
test:cppcheck:
stage: test
script:
- cppcheck -j $(nproc)
--max-configs=32
--error-exitcode=1
--quiet
--inline-suppr
--enable=warning,performance,portability,information,missingInclude
--std=c++11
--suppress=noValidConfiguration
-I include
-I common/include
gpu/
src/
lib/
tests/unit/ | tee cppcheck.log
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
dependencies:
- build:source
tags:
- docker
artifacts:
when: on_failure
paths:
- cppcheck.log
expose_as: cppcheck