Update docker files and cirrus config

- Ubuntu focal is the lowest LTS release that we can support with only
  distro packages (e.g. no rustup).
- Remove tsan from Cirrus (it's not working currently, and also not really
  important).
- Remove Centos (it passes tests but I'm not sure it's worth adding; there
  isn't even an official docker image for CentOS Stream).
This commit is contained in:
Johannes Altmanninger 2024-08-04 10:18:06 +02:00
parent 3984725b80
commit 4df0adefc8
14 changed files with 75 additions and 126 deletions

View File

@ -8,38 +8,18 @@ linux_task:
container: &step
image: ghcr.io/fish-shell/fish-ci/alpine:latest
memory: 4GB
- name: bionic
- name: jammy
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic:latest
- name: bionic-asan-clang
image: ghcr.io/fish-shell/fish-ci/jammy:latest
- name: jammy-asan
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-asan-clang:latest
- name: bionic-tsan
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-tsan:latest
- name: bionic-tsan-clang
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-tsan-clang:latest
- name: centos7
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/centos7:latest
- name: centos8
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/centos8:latest
image: ghcr.io/fish-shell/fish-ci/jammy-asan:latest
- name: focal-32bit
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/focal-32bit:latest
- name: xenial
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/xenial:latest
tests_script:
# cirrus at times gives us 32 procs and 2 GB of RAM

View File

@ -11,6 +11,10 @@ if(DEFINED ASAN)
list(APPEND CARGO_FLAGS "-Z" "build-std")
list(APPEND FISH_CRATE_FEATURES "asan")
endif()
if(DEFINED TSAN)
list(APPEND CARGO_FLAGS "-Z" "build-std")
list(APPEND FISH_CRATE_FEATURES "tsan")
endif()
if (Rust_CARGO_TARGET)
set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_TARGET}")

View File

@ -139,6 +139,12 @@ if(DEFINED ASAN)
intended target triple")
endif()
endif()
if(DEFINED TSAN)
if(NOT DEFINED Rust_CARGO_TARGET)
message(FATAL_ERROR "TSAN requires defining the CMake variable Rust_CARGO_TARGET to the
intended target triple")
endif()
endif()
if(DEFINED Rust_CARGO_TARGET)
list(APPEND cargo_test_flags "--target" ${Rust_CARGO_TARGET})

View File

@ -5,18 +5,21 @@ ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apk add --no-cache \
bash \
cmake \
g++ \
gettext-dev \
git \
libintl \
musl-dev \
ninja \
pcre2-dev \
python3 \
py3-pexpect \
cargo
bash \
cargo \
cmake \
g++ \
gettext-dev \
git \
libintl \
musl-dev \
ninja \
pcre2-dev \
py3-pexpect \
python3 \
rust \
sudo \
tmux
RUN addgroup -g 1000 fishuser

View File

@ -1,32 +0,0 @@
FROM centos:7
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
# install epel first to get cmake3
RUN yum install --assumeyes epel-release https://repo.ius.io/ius-release-el7.rpm \
&& yum install --assumeyes \
cmake3 \
gcc-c++ \
git236 \
ninja-build \
python3 \
openssl \
pcre2-devel \
sudo \
&& yum clean all
# cmake is called "cmake3" on centos7.
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake \
&& pip3 install pexpect
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser
COPY fish_run_tests.sh /
CMD /fish_run_tests.sh

View File

@ -1,4 +1,4 @@
FROM centos:8
FROM tgagor/centos-stream:latest
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
# See https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal
@ -13,19 +13,21 @@ RUN dnf -y install dnf-plugins-core \
&& dnf config-manager --set-enabled powertools \
&& yum install --assumeyes epel-release \
&& yum install --assumeyes \
cargo \
cmake \
diffutils \
gcc-c++ \
git \
ninja-build \
python3 \
python3-pexpect \
openssl \
pcre2-devel \
rustc \
sudo \
tmux \
&& yum clean all
RUN pip3 install pexpect
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
&& mkdir -p /home/fishuser/fish-build \

View File

@ -3,7 +3,7 @@ LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV CXXFLAGS="-m32 -Werror=address -Werror=return-type" CFLAGS="-m32"
ENV CFLAGS="-m32"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
@ -19,6 +19,7 @@ RUN apt-get update \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
@ -32,6 +33,11 @@ RUN groupadd -g 1000 fishuser \
USER fishuser
WORKDIR /home/fishuser
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --default-toolchain nightly --component rust-src
COPY fish_run_tests.sh /
CMD /fish_run_tests.sh
CMD . ~/.cargo/env \
&& rustup target add i686-unknown-linux-gnu \
&& /fish_run_tests.sh -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i686-unknown-linux-gnu

View File

@ -8,8 +8,9 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install \
build-essential \
cargo \
cmake \
clang-9 \
clang \
gettext \
git \
libpcre2-dev \
@ -17,7 +18,9 @@ RUN apt-get update \
ninja-build \
python3 \
python3-pexpect \
rustc \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean

View File

@ -1,22 +1,25 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install \
build-essential \
cargo \
cmake \
clang-9 \
gettext \
git \
libpcre2-dev \
locales \
ninja-build \
pkg-config \
python3 \
python3-pexpect \
rustc \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
@ -32,5 +35,4 @@ WORKDIR /home/fishuser
COPY fish_run_tests.sh /
ENV CXXFLAGS "-fsanitize=thread"
CMD /fish_run_tests.sh

View File

@ -3,12 +3,12 @@ LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV CXXFLAGS="-Werror=address -Werror=return-type -Wno-psabi"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install \
build-essential \
cargo \
cmake \
file \
g++ \
@ -20,7 +20,9 @@ RUN apt-get update \
pkg-config \
python3 \
python3-pexpect \
rust \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean

View File

@ -16,9 +16,8 @@ RUN apt-get update \
ninja-build \
python3 \
python3-pexpect \
tmux \
rustc \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
@ -42,9 +41,9 @@ COPY fish_run_tests.sh /
ENV \
RUSTFLAGS=-Zsanitizer=address \
RUSTDOCFLAGS=-Zsanitizer=address \
CC=clang \
CXX=clang++ \
CXXFLAGS=-DFISH_CI_SAN \
ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1 \
LSAN_OPTIONS=verbosity=0:log_threads=0:use_tls=1:print_suppressions=0:suppressions=/fish-source/build_tools/lsan_suppressions.txt \
FISH_CI_SAN=1

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:jammy
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
@ -8,7 +8,7 @@ RUN apt-get update \
&& apt-get -y install \
build-essential \
cmake \
clang-9 \
clang \
gettext \
git \
libpcre2-dev \
@ -17,6 +17,7 @@ RUN apt-get update \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
@ -30,7 +31,15 @@ RUN groupadd -g 1000 fishuser \
USER fishuser
WORKDIR /home/fishuser
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --default-toolchain nightly --component rust-src
COPY fish_run_tests.sh /
ENV CXXFLAGS="-fsanitize=thread" CC=clang-9 CXX=clang++-9
CMD /fish_run_tests.sh
ENV \
RUSTFLAGS=-Zsanitizer=thread \
RUSTDOCFLAGS=-Zsanitizer=thread \
FISH_CI_SAN=1
CMD . ~/.cargo/env \
&& /fish_run_tests.sh -DTSAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:jammy
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
@ -7,8 +7,9 @@ ENV LC_ALL C.UTF-8
RUN apt-get update \
&& apt-get -y install \
build-essential \
cargo \
cmake \
clang-9 \
clang \
gettext \
git \
libpcre2-dev \
@ -16,7 +17,9 @@ RUN apt-get update \
ninja-build \
python3 \
python3-pexpect \
rustc \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean

View File

@ -1,38 +0,0 @@
FROM ubuntu:16.04
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update \
&& apt-get -y install \
build-essential \
cmake \
gettext \
git \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pip \
sudo \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
# The python3-pexpect package on Xenial doesn't allow delaybeforesend to be None.
# Install pexpect with pip which is newer.
RUN pip3 install pexpect
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
&& adduser fishuser sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser
COPY fish_run_tests.sh /
CMD /fish_run_tests.sh