1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
This commit is contained in:
Steffen Vogel 2020-06-08 03:13:23 +02:00
parent cf9e3ace4b
commit 711b5781d0
2 changed files with 29 additions and 19 deletions

View file

@ -1,18 +1,13 @@
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
PREFIX: /usr/
DOCKER_TAG_DEV: ${CI_BUILD_REF_SLUG}
DOCKER_IMAGE_DEV: villas/common-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
- prepare
- build
- test
# Stage: prepare
##############################################################################
@ -22,9 +17,9 @@ docker-dev:
stage: prepare
image: docker:19.03
script:
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
tags:
- docker
- docker
# Stage: build
##############################################################################
@ -32,15 +27,15 @@ docker-dev:
build:source:
stage: build
script:
- mkdir build && cd build && cmake .. && make -j8
- mkdir build && cd build && cmake .. && make -j8
artifacts:
expire_in: 1 week
name: ${CI_PROJECT_NAME}-${CI_BUILD_REF}
paths:
- build/
- build/
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
- docker
# Stage: test
##############################################################################
@ -48,9 +43,9 @@ build:source:
test:unit:
stage: test
dependencies:
- build:source
- build:source
script:
- build/tests/unit/unit-tests-common
- build/tests/unit/unit-tests-common
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
- docker

View file

@ -46,15 +46,14 @@ LABEL \
RUN dnf -y install \
gcc gcc-c++ \
make cmake \
git curl tar
pkgconfig git curl tar
# Dependencies
RUN dnf -y install \
jansson-devel \
libcurl-devel \
libconfig-devel \
openssl-devel openssl \
spdlog-devel
openssl-devel openssl
# Build & Install Criterion
RUN cd /tmp && \
@ -64,6 +63,22 @@ RUN cd /tmp && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make install && \
rm -rf /tmp/*
# Build & Install Fmtlib
RUN cd /tmp && \
git clone --recursive https://github.com/fmtlib/fmt.git && \
mkdir -p fmt/build && cd fmt/build && \
git checkout 5.2.0 && \
cmake -DBUILD_SHARED_LIBS=1 .. && make install && \
rm -rf /tmp/*
# Build & Install spdlog
RUN cd /tmp && \
git clone --recursive https://github.com/gabime/spdlog.git && \
mkdir -p spdlog/build && cd spdlog/build && \
git checkout v1.3.1 && \
cmake -DSPDLOG_FMT_EXTERNAL=ON -DSPDLOG_BUILD_BENCH=OFF .. && make install && \
rm -rf /tmp/*
ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64
WORKDIR /villas