Skip to content
Snippets Groups Projects

Added infer and minor cleanup

Merged Vivek Dutta requested to merge infer into devel
All threads resolved!
Files
3
@@ -18,7 +18,6 @@ RUN \
autoconf \
automake \
build-essential \
clang-format \
cmake \
curl \
gcovr \
@@ -51,7 +50,6 @@ RUN \
libnl-route-3-dev \
libpcre3-dev \
libssl-dev \
libssl-dev \
libtool \
libtrace-dev \
libuv1-dev \
@@ -66,30 +64,25 @@ RUN \
# Dependencies for ieee1905
libpcap-dev \
clang \
shellcheck
clang-format \
clang-tidy \
shellcheck \
jq \
python3-pip \
cppcheck \
bear
RUN mkdir /opt/dev && \
mkdir /etc/config
RUN git config --global advice.detachedHead false
# install cppcheck
ARG CPPCHECK_VERSION=2.7
RUN \
cd /opt/dev && \
git clone -b ${CPPCHECK_VERSION} --depth=1 https://github.com/danmar/cppcheck.git && \
cd cppcheck && \
mkdir build && \
cd build && \
cmake -DHAVE_RULES=ON -DUSE_MATCHCOMPILER=ON .. && \
cmake --build . && \
cmake --install . && \
cd ../.. && \
rm -rf cppcheck
# install node
ARG NODEJS_VERSION_MAJOR=16
RUN curl -fsSL "https://deb.nodesource.com/setup_${NODEJS_VERSION_MAJOR}.x" | bash - && \
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODEJS_VERSION_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
apt-get -y update && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
@@ -113,7 +106,7 @@ RUN \
cd json-c && \
git checkout ${JSON_C_VERSION} && \
cmake . && \
make && \
make -j$(nproc) && \
make install && \
ldconfig
@@ -124,8 +117,8 @@ RUN \
git clone https://git.openwrt.org/project/libubox.git && \
cd libubox && mkdir build && cd build && \
git checkout ${LIBUBOX_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" .. && \
make -j2 && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_LUA=OFF -DCMAKE_BUILD_TYPE:String="Release" .. && \
make -j$(nproc) && \
make install
# uci
@@ -136,7 +129,7 @@ RUN \
cd uci && \
git checkout ${UCI_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" -DBUILD_LUA=OFF . && \
make -j2 && \
make -j$(nproc) && \
make install
# ubus
@@ -147,7 +140,7 @@ RUN \
cd ubus && \
git checkout ${UBUS_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" -DBUILD_LUA=OFF -DBUILD_EXAMPLES=OFF . && \
make -j2 && \
make -j$(nproc) && \
make install
# rpcd
@@ -158,18 +151,7 @@ RUN \
cd rpcd && \
git checkout ${RPCD_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" -DIWINFO_SUPPORT=OFF -DUCODE_SUPPORT=OFF . && \
make -j2 && \
make install
# json-editor
ARG JSON_EDITOR_VERSION=44b32937a062ec4ffc9f7355841dc94ab6efa50f
RUN \
cd /opt/dev && \
git clone https://dev.iopsys.eu/iopsys/json-editor.git && \
cd json-editor && \
git checkout ${JSON_EDITOR_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" . && \
make && \
make -j$(nproc) && \
make install
# json-cpp
@@ -182,7 +164,7 @@ RUN \
mkdir build && \
cd build && \
cmake .. && \
cmake --build . && \
make -j$(nproc) && \
make install
# json-schema-validator-cpp
@@ -195,7 +177,7 @@ RUN \
mkdir build && \
cd build && \
cmake .. -DBUILD_SHARED_LIBS=ON && \
make && \
make -j$(nproc) && \
make install && \
ldconfig
@@ -208,7 +190,7 @@ RUN \
cd json-schema-validator && \
git checkout ${JSON_SCHEMA_VALIDATOR_VERSION} && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE:String="Release" . && \
make && \
make -j$(nproc) && \
make install && \
ldconfig
@@ -219,7 +201,7 @@ RUN \
git clone https://github.com/zorgnax/libtap.git && \
cd libtap && \
git checkout ${TAP_VERSION} && \
make && \
make -j$(nproc) && \
make install && \
ldconfig
@@ -230,7 +212,7 @@ RUN \
git clone https://dev.iopsys.eu/iopsys/ubus-api-validator.git && \
cd ubus-api-validator && \
git checkout ${UBUS_API_VALIDATOR_VERSION} && \
make && \
make -j$(nproc) && \
make install
#install cpd
@@ -251,22 +233,38 @@ RUN \
autoreconf -i; \
cd /opt/dev/microxml && \
./configure --prefix=/usr --disable-threads --enable-shared --enable-static && \
make && \
make -j$(nproc) && \
make install && \
ln -sf /usr/lib/libmicroxml.so.1.0 /lib/libmicroxml.so && \
ln -sf /usr/lib/libmicroxml.so.1.0 /lib/libmicroxml.so.1
# Download the Infer release
ARG INFER_VERSION=v1.2.0
RUN cd /opt/dev && \
curl -sL https://github.com/facebook/infer/releases/download/${INFER_VERSION}/infer-linux-x86_64-${INFER_VERSION}.tar.xz | tar xJ && \
mv /opt/dev/infer-linux-x86_64-$INFER_VERSION /infer
# Install infer
ENV PATH /infer/bin:${PATH}
# Install python ubus module and valgrind-ci
RUN pip3 install ubus ValgrindCI codechecker
WORKDIR /builds/iopsys/
# Prepare supervisor
RUN mkdir -p /var/log/supervisor && \
mkdir -p /etc/supervisor/conf.d/
COPY supervisord.conf /etc/supervisor/
# Prepare JSON Schemas
RUN mkdir -p /usr/share/rpcd/schemas && \
mkdir -p /usr/share/rpcd/definitions
# Copy static_code_analysis script
COPY static_code_analysis.sh /usr/local/bin/static_code_analysis.sh
# Start entrypoint
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
Loading