1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

ci: update CI config

This commit is contained in:
Steffen Vogel 2020-06-15 21:55:03 +02:00
parent 031311ba95
commit 7e2365bfa0
3 changed files with 17 additions and 48 deletions

View file

@ -1,19 +1,13 @@
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
PREFIX: /usr/
DOCKER_TAG_DEV: ${CI_BUILD_REF_SLUG}
DOCKER_IMAGE_DEV: villas/fpga-dev
# For some reason, GitLab CI prunes the contents of the submodules so we need to restore them.
before_script:
- git submodule foreach git checkout .
stages:
- prepare
- build
- test
# - deploy
# Stage: prepare
##############################################################################
@ -43,19 +37,6 @@ build:source:
tags:
- docker
#build:packages:
# stage: build
# script:
# - mkdir build && cd build && cmake3 .. && make package
# 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
##############################################################################
@ -66,32 +47,12 @@ test:unit:
- cuda
allow_failure: true
script: |
rm -r build && mkdir build && cd build && cmake3 .. && make unit-tests -j8
rm -r build && mkdir build && cd build
cmake3 ..
make -j$(nproc) unit-tests
if [ "$(who | wc -l)" -eq "0" ]; then
tests/unit-tests --jobs 1 --filter 'fpga/*'
tests/fpga-unit-tests --jobs 1 --filter 'fpga/*'
else
echo "System is currently used by: $(who)"
echo "We are skipping the test. Please restart manually."
fi
# Stage: deploy
##############################################################################
#deploy:packages:
# stage: deploy
# script:
# - ssh ${DEPLOY_USER}@${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}/{dist,../packages}
# - rsync ${RSYNC_OPTS} build/*.rpm ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/../packages/
# - rsync ${RSYNC_OPTS} build//*.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/dist/
# - ssh ${DEPLOY_USER}@${DEPLOY_HOST} createrepo ${DEPLOY_PATH}/../packages
# dependencies:
# - build:packages
# tags:
# - villas-deploy
# only:
# - tags
#
#deploy:git-mirror:
# stage: deploy
# script:
# - git push --force --mirror --prune https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com:VILLASframework/VILLASnode.git

View file

@ -51,6 +51,8 @@ endif()
include(FindPkgConfig)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig")
pkg_check_modules(JANSSON REQUIRED IMPORTED_TARGET jansson)
pkg_check_modules(XIL REQUIRED IMPORTED_TARGET libxil)

View file

@ -71,7 +71,6 @@ RUN git clone --recursive https://github.com/fmtlib/fmt.git /tmp/fmt && \
make -j$(nproc) install && \
rm -rf /tmp/fmt
# Build & Install spdlog
RUN git clone --recursive https://github.com/gabime/spdlog.git /tmp/spdlog && \
mkdir -p /tmp/spdlog/build && cd /tmp/spdlog/build && \
@ -81,12 +80,19 @@ RUN git clone --recursive https://github.com/gabime/spdlog.git /tmp/spdlog && \
rm -rf /tmp/spdlog
# Build & Install Criterion
COPY thirdparty/criterion /tmp/criterion
RUN mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && cmake3 .. && make install && rm -rf /tmp/*
RUN git clone --recursive https://github.com/Snaipe/Criterion /tmp/criterion && \
mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && \
git checkout v2.3.3 && \
cmake3 .. && \
make -j$(nproc) install && \
rm -rf /tmp/*
# Build & Install libxil
COPY thirdparty/libxil /tmp/libxil
RUN mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && cmake3 .. && make install && rm -rf /tmp/*
RUN git clone https://git.rwth-aachen.de/acs/public/villas/fpga/libxil.git /tmp/libxil && \
mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && \
cmake3 .. && \
make -j$(nproc) install && \
rm -rf /tmp/*
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64