Commit f285b99b authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

fix CI

parent bfa39f9c
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
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment