Skip to content
Snippets Groups Projects
Commit 8a7cebea authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

chore(ci): adding a dockerfile to install, build and run unit tests

parent 95c411c1
No related branches found
No related tags found
1 merge request!83Add Unit testing to common-src
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface AMF service
# Valid for Ubuntu-20.04 (focal),
# Ubuntu-22.04 (jammy)
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# BASE IMAGE
#---------------------------------------------------------------------
ARG BASE_IMAGE=ubuntu:jammy
FROM $BASE_IMAGE as common-src-unit-tests
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
ENV IS_DOCKERFILE=1
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
git \
build-essential \
cmake \
make \
libasio-dev \
libboost-all-dev \
libasan6 \
googletest-tools \
libgoogle-glog-dev \
libgtest-dev \
libtool \
libfmt-dev \
libspdlog-dev \
nlohmann-json3-dev \
libyaml-cpp-dev \
pkg-config
ENV OPENAIRCN_DIR=/openair-unit-tests
WORKDIR /openair-unit-tests
COPY . /openair-unit-tests
# Building all unit-tests
WORKDIR /openair-unit-tests/build/common/_build
RUN cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF && \
make -j`nproc` all
# Running all unit-tests
WORKDIR /openair-unit-tests/build/common/_build/test
RUN ctest -V
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