| 1 |
# This file is part of the bladeRF project: |
| 2 |
# http://www.github.com/nuand/bladeRF |
| 3 |
# |
| 4 |
# Copyright (c) 2018 Nuand LLC. |
| 5 |
# |
| 6 |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 |
# of this software and associated documentation files (the "Software"), to deal |
| 8 |
# in the Software without restriction, including without limitation the rights |
| 9 |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 |
# copies of the Software, and to permit persons to whom the Software is |
| 11 |
# furnished to do so, subject to the following conditions: |
| 12 |
# |
| 13 |
# The above copyright notice and this permission notice shall be included in |
| 14 |
# all copies or substantial portions of the Software. |
| 15 |
# |
| 16 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 |
# THE SOFTWARE. |
| 23 |
|
| 24 |
FROM ubuntu:focal |
| 25 |
|
| 26 |
LABEL maintainer="Nuand LLC <[email protected]>" |
| 27 |
LABEL version="0.0.2" |
| 28 |
LABEL description="CI build environment for the bladeRF project" |
| 29 |
LABEL com.nuand.ci.distribution.name="Ubuntu" |
| 30 |
LABEL com.nuand.ci.distribution.codename="focal" |
| 31 |
LABEL com.nuand.ci.distribution.version="20.10" |
| 32 |
|
| 33 |
ENV DEBIAN_FRONTEND=noninteractive |
| 34 |
|
| 35 |
# Install things |
| 36 |
RUN apt-get update \ |
| 37 |
&& apt-get install -y \ |
| 38 |
build-essential \ |
| 39 |
clang \ |
| 40 |
cmake \ |
| 41 |
doxygen \ |
| 42 |
git \ |
| 43 |
help2man \ |
| 44 |
libcurl4-openssl-dev \ |
| 45 |
libedit-dev \ |
| 46 |
libncurses5-dev \ |
| 47 |
libusb-1.0-0-dev \ |
| 48 |
pandoc \ |
| 49 |
pkg-config \ |
| 50 |
usbutils \ |
| 51 |
&& apt-get clean |
| 52 |
|
| 53 |
# Copy in our build context |
| 54 |
COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF |
| 55 |
COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config |
| 56 |
WORKDIR /root/bladeRF |
| 57 |
|
| 58 |
# Build arguments |
| 59 |
ARG compiler=gcc |
| 60 |
ARG buildtype=Release |
| 61 |
ARG taggedrelease=NO |
| 62 |
ARG parallel=1 |
| 63 |
|
| 64 |
# Do the build! |
| 65 |
RUN cd /root/bladeRF/ \ |
| 66 |
&& mkdir -p build \ |
| 67 |
&& cd build \ |
| 68 |
&& cmake \ |
| 69 |
-DBUILD_DOCUMENTATION=ON \ |
| 70 |
-DCMAKE_C_COMPILER=${compiler} \ |
| 71 |
-DCMAKE_BUILD_TYPE=${buildtype} \ |
| 72 |
-DENABLE_FX3_BUILD=OFF \ |
| 73 |
-DENABLE_HOST_BUILD=ON \ |
| 74 |
-DTAGGED_RELEASE=${taggedrelease} \ |
| 75 |
../ \ |
| 76 |
&& make -j${parallel} \ |
| 77 |
&& make install \ |
| 78 |
&& ldconfig |