-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
78 lines (65 loc) · 2.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM ubuntu:22.04 as base
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /tmp/
RUN apt-get update && apt-get install -y \
ninja-build \
cmake \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
FROM base as static-analysis
ARG CPPCHECK_VERSION="2.10.3"
ARG CPPCHECK_URL="https://github.com/danmar/cppcheck/archive/refs/tags/${CPPCHECK_VERSION}.tar.gz"
ARG CPPCHECK_FOLDER="cppcheck-${CPPCHECK_VERSION}"
RUN apt-get update \
&& apt-get install -y \
build-essential \
python3 \
libpcre3-dev \
&& wget $CPPCHECK_URL -O /tmp/cppcheck.tar.gz \
&& tar -xvzf /tmp/cppcheck.tar.gz -C /tmp/ \
&& cd "/tmp/${CPPCHECK_FOLDER}" \
&& make MATCHCOMPILER=no FILESDIR=/usr/share/cppcheck HAVE_RULES=no CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" -j2 \
&& FILESDIR=/usr/share/cppcheck make install \
&& cd /tmp/ \
&& rm -rf "/tmp/${CPPCHECK_FOLDER}" \
&& rm -rf /var/lib/apt/lists/*
FROM base as native-gcc
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
FROM base as avr-gcc
RUN apt-get update && apt-get install -y \
binutils \
gcc-avr \
avr-libc \
&& rm -rf /var/lib/apt/lists/*
FROM base as native-clang
RUN apt-get update && apt-get install -y \
clang \
&& rm -rf /var/lib/apt/lists/*
FROM base as powerpc64-linux-gcc
RUN apt-get update && apt-get install -y \
gcc-powerpc64-linux-gnu \
g++-powerpc64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*
FROM base as aarch64-linux-gcc
RUN apt-get update && apt-get install -y \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*
FROM base as arm-none-gcc
RUN apt-get update && apt-get install -y \
gcc-arm-none-eabi \
&& rm -rf /var/lib/apt/lists/*
#Jenkins runs everything up to the specified target.
# So that would be the stopping point of the Wait Docker stage
FROM base AS CI
FROM native-gcc as dev-sample
WORKDIR /app
COPY . .
RUN CMAKE_TOOLCHAIN_FILE=\/app/cmake/gcc.cmake \
SCRUTINY_BUILD_TEST=1 \
SCRUTINY_BUILD_TESTAPP=1 \
bash scripts/build.sh
CMD /app/build-dev/projects/testapp/testapp udp-listen 12345