Skip to content

Commit

Permalink
Add minimal ubuntu-19.10 CI test run.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Apr 15, 2020
1 parent 8d74a9e commit 89eec79
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 34 deletions.
28 changes: 28 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,31 @@ macos_release_task:
- ninja -C build all check
test_build_script:
- (cd tests && btest -j)

docker_ubuntu_19_10_task:
trigger_type: manual
container:
dockerfile: docker/Dockerfile.ubuntu-19.10
cpu: 8
memory: 16G

timeout_in: 120m

ccache_cache:
folder: /var/spool/cache
fingerprint_script: echo $CIRRUS_TASK_NAME-$CIRRUS_OS
env:
CCACHE_DIR: /var/spool/ccache
CCACHE_COMPRESS: 1

# Pull tags as well since by default Cirrus CI does not fetch them, but they
# are needed for `git describe` used in `scripts/autogen-version`. We also
# pull submodules here.
update_git_script:
- git fetch --tags
- git submodule update --recursive --init

configure_script:
- ./configure --generator=Ninja --enable-ccache
build_script:
- ninja -C build install -j5
64 changes: 30 additions & 34 deletions docker/Dockerfile.ubuntu-19.10
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
FROM ubuntu:19.10

WORKDIR /root

ENV PATH="/opt/spicy/bin:/opt/zeek/bin:${PATH}"
ENV ZEEK_PLUGIN_PATH="/opt/spicy/lib64/spicy/"
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update

# Install development tools.
RUN apt-get install -y ccache curl g++ gcc gdb git locales-all make ninja-build python3 python3-pip vim

# Need a more recent CMake than available.
RUN cd /usr/local && curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz | tar xzvf - && ln -s /usr/local/cmake-3.16.4-Linux-x86_64/bin/cmake /usr/local/bin

# Install Spicy dependencies.
RUN apt-get install -y bison clang-9 flex libclang-9-dev python3-sphinx python3-sphinx-rtd-theme
RUN pip3 install btest

# Install Zeek dependencies.
RUN apt-get install -y libpcap-dev libssl-dev python-dev swig zlib1g-dev

# Install Zeek.
RUN mkdir -p /opt/zeek/src
RUN cd /opt/zeek && git clone -b release/3.0 --recursive https://github.com/zeek/zeek src
RUN cd /opt/zeek/src && ./configure --generator=Ninja --prefix=/opt/zeek && cd build && ninja && ninja install && cd .. && rm -rf build

# Install Spicy.
ADD . /opt/spicy/src

RUN cd /opt/spicy/src && \
./configure --prefix=/opt/spicy --with-zeek=/opt/zeek --generator=Ninja && \
cd build && ninja install && cd .. && rm -rf build
FROM ubuntu:eoan

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

CMD ["sh"]

ENV DEBIAN_FRONTEND=noninteractive
ENV CCACHE_DIR=/var/spool/ccache
ENV CCACHE_COMPRESS=1

RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg2 \
# Zeek.
&& echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_19.10/ /' > /etc/apt/sources.list.d/security:zeek.list \
&& curl https://download.opensuse.org/repositories/security:/zeek/xUbuntu_19.10/Release.key | apt-key add - \
&& apt-get update \
&& apt-get install -y --no-install-recommends zeek-lts zeek-lts-core-dev \
# Spicy build and test dependencies.
&& apt-get install -y --no-install-recommends git ninja-build ccache g++ llvm-9-dev libclang-9-dev bison flex libfl-dev python3 python3-pip zlib1g-dev jq locales-all python3-setuptools python3-wheel \
&& pip3 install btest pre-commit \
# Spicy doc dependencies.
&& apt-get install -y --no-install-recommends python3-sphinx python3-sphinx-rtd-theme \
# Cleanup.
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install a recent CMake.
WORKDIR /usr/local/cmake
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.15.0/cmake-3.15.0-Linux-x86_64.tar.gz | tar xzvf - -C /usr/local/cmake --strip-components 1
ENV PATH="/usr/local/cmake/bin:${PATH}"

0 comments on commit 89eec79

Please sign in to comment.