From 821f20765b3c122edc2af9a7e0711c0e1b9c4a05 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Thu, 4 Apr 2024 12:20:50 +0200 Subject: [PATCH] Update CI setups. This bumps all CI setups to b465b010e7c56ec62152e75d96fad4e761e49360. --- .cirrus.yml | 54 +++++++++++++++++++++------------ docker/Dockerfile.debian-12 | 40 ++++++++++++++++++++++++ docker/Dockerfile.fedora-39 | 14 +++++++++ docker/Dockerfile.opensuse-15.5 | 25 +++++++++++++++ 4 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 docker/Dockerfile.debian-12 create mode 100644 docker/Dockerfile.fedora-39 create mode 100644 docker/Dockerfile.opensuse-15.5 diff --git a/.cirrus.yml b/.cirrus.yml index 277b7e486..ecb791fa4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,7 +7,6 @@ environment: HILTI_JIT_SEQUENTIAL: 1 # Images for macOS - IMAGE_MACOS_MONTEREY: ghcr.io/cirruslabs/macos-monterey-base:latest IMAGE_MACOS_VENTURA: ghcr.io/cirruslabs/macos-ventura-base:latest # Branches to use for spicy-plugin and spicy-analyzers tests. @@ -247,16 +246,33 @@ validate_release_tarball_task: - cd /tmp/spicy-tarball/spicy-* - make -C tests -homebrew_monterey_task: +ventura_task: skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' - macos_instance: - image: $IMAGE_MACOS_MONTEREY + image: $IMAGE_MACOS_VENTURA - script: - - brew tap zeek/zeek - - brew install spicy --HEAD - - brew test spicy + timeout_in: 120m + + always: + ccache_cache: + folder: /tmp/ccache + fingerprint_script: echo $CIRRUS_TASK_NAME-$CIRRUS_OS + reupload_on_changes: true + + env: + CCACHE_DIR: /tmp/ccache + + update_git_script: + - git submodule update --recursive --init + install_dependencies_script: + - brew install bison cmake flex ninja ccache + - python3 -mvenv /tmp/btest.venv && /tmp/btest.venv/bin/pip install btest + configure_script: + - ./configure --with-flex=$(brew --prefix flex) --with-bison=$(brew --prefix bison) --generator=Ninja --enable-ccache --build-type=Debug + build_script: + - ninja -C build + test_script: + - (source /tmp/btest.venv/bin/activate && btest -djc tests/btest.cfg) homebrew_ventura_task: skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' @@ -338,11 +354,9 @@ docker_centos_stream_8_task: path: ./spicy*.{deb,rpm} type: application/gzip -docker_debian10_task: - skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' - +docker_debian11_task: container: - dockerfile: docker/Dockerfile.debian-10 + dockerfile: docker/Dockerfile.debian-11 cpu: 4 memory: 12G @@ -374,9 +388,9 @@ docker_debian10_task: path: ./spicy*.{deb,rpm} type: application/gzip -docker_debian11_task: +docker_debian12_task: container: - dockerfile: docker/Dockerfile.debian-11 + dockerfile: docker/Dockerfile.debian-12 cpu: 4 memory: 12G @@ -481,11 +495,11 @@ docker_ubuntu22_task: path: ./spicy*.{deb,rpm} type: application/gzip -docker_fedora37_task: +docker_fedora38_task: skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' container: - dockerfile: docker/Dockerfile.fedora-37 + dockerfile: docker/Dockerfile.fedora-38 cpu: 4 memory: 12G @@ -518,11 +532,11 @@ docker_fedora37_task: path: ./spicy*.{deb,rpm} type: application/gzip -docker_fedora38_task: +docker_fedora39_task: skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' container: - dockerfile: docker/Dockerfile.fedora-38 + dockerfile: docker/Dockerfile.fedora-39 cpu: 4 memory: 12G @@ -555,11 +569,11 @@ docker_fedora38_task: path: ./spicy*.{deb,rpm} type: application/gzip -docker_opensuse15_2_task: +docker_opensuse15_5_task: skip: $CIRRUS_BRANCH != 'main' && $CIRRUS_TAG == '' container: - dockerfile: docker/Dockerfile.opensuse-15.2 + dockerfile: docker/Dockerfile.opensuse-15.5 cpu: 4 memory: 12G diff --git a/docker/Dockerfile.debian-12 b/docker/Dockerfile.debian-12 new file mode 100644 index 000000000..7e4c5a490 --- /dev/null +++ b/docker/Dockerfile.debian-12 @@ -0,0 +1,40 @@ +# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. + +FROM debian:bookworm-slim + +ENV DEBIAN_FRONTEND noninteractive +ENV CCACHE_DIR "/var/spool/ccache" +ENV CCACHE_COMPRESS 1 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN apt-get -q update && \ + apt-get install -y --no-install-recommends \ + binutils \ + bison \ + ccache \ + cmake \ + file \ + flex \ + gcc \ + g++ \ + git \ + google-perftools \ + jq \ + libfl-dev \ + libgoogle-perftools-dev \ + libkrb5-dev \ + libmaxminddb-dev \ + libpcap0.8-dev \ + libssl-dev \ + locales-all \ + make \ + ninja-build \ + python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + swig \ + zlib1g-dev && \ + pip3 install --break-system-packages --no-cache-dir "btest>=0.66" pre-commit diff --git a/docker/Dockerfile.fedora-39 b/docker/Dockerfile.fedora-39 new file mode 100644 index 000000000..9fd6b0742 --- /dev/null +++ b/docker/Dockerfile.fedora-39 @@ -0,0 +1,14 @@ +# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. + +FROM fedora:39 + +RUN echo 'LC_CTYPE="C"' >> /etc/locale.conf \ + && echo 'LC_ALL="C"' >> /etc/locale.conf \ + && echo 'LANG="C"' >> /etc/locale.conf \ + # Install Spicy build dependencies + && dnf install -y ccache git ninja-build cmake flex bison gcc-c++ findutils diffutils python3-pip which openssl-devel zlib-devel \ + && pip3 install "btest>=0.66" \ + # Install rpmdevtools for packaging RPM files. + && dnf install -y rpmdevtools + +WORKDIR /root diff --git a/docker/Dockerfile.opensuse-15.5 b/docker/Dockerfile.opensuse-15.5 new file mode 100644 index 000000000..d434cbc29 --- /dev/null +++ b/docker/Dockerfile.opensuse-15.5 @@ -0,0 +1,25 @@ +# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. + +FROM opensuse/leap:15.5 + +RUN zypper addrepo https://download.opensuse.org/repositories/openSUSE:Leap:15.2:Update/standard/openSUSE:Leap:15.2:Update.repo \ + && zypper refresh \ + && zypper install -y \ + bison \ + ccache \ + cmake \ + flex \ + gcc9-c++ \ + git \ + ninja \ + python3 \ + python3-pip \ + rpmbuild \ + which \ + zlib-devel \ + && zypper clean + +RUN pip3 install "btest>=0.66" sphinx-rtd-theme + +ENV CXX g++-9 +ENV CC gcc-9