From 4410eb34d83ef0e9c17b45b242309820edae73f6 Mon Sep 17 00:00:00 2001 From: Maik Nijhuis Date: Wed, 6 Apr 2022 09:41:42 +0200 Subject: [PATCH] Add Ubuntu 22 CI builds --- .github/workflows/linux.yml | 4 ++- docker/ubuntu2204_clang.docker | 53 ++++++++++++++++++++++++++++++++++ docker/ubuntu2204_gcc.docker | 52 +++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 docker/ubuntu2204_clang.docker create mode 100644 docker/ubuntu2204_gcc.docker diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4c91d7c1b2c..ec046721cb5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,10 +16,12 @@ jobs: - ubuntu1804_gcc - ubuntu2004_clang - ubuntu2004_gcc + - ubuntu2204_clang + - ubuntu2204_gcc steps: - name: Checkout uses: actions/checkout@v2 - + - name: Build container run: docker build . -t ${{ matrix.dist }} -f docker/${{ matrix.dist }}.docker diff --git a/docker/ubuntu2204_clang.docker b/docker/ubuntu2204_clang.docker new file mode 100644 index 00000000000..52c434627d3 --- /dev/null +++ b/docker/ubuntu2204_clang.docker @@ -0,0 +1,53 @@ +FROM ubuntu:22.04 +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -y \ + clang \ + cmake \ + flex \ + bison \ + libblas-dev \ + liblapack-dev \ + libcfitsio-dev \ + wcslib-dev \ + libfftw3-dev \ + gfortran \ + libncurses5-dev \ + libreadline6-dev \ + libhdf5-serial-dev \ + libboost-dev \ + libboost-python-dev \ + libboost-test-dev \ + libgsl-dev \ + python-is-python3 \ + python3-numpy \ + wget \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ +# Install WSRT Measures (extra casacore data, for tests) +# Note: The file on the ftp site is updated daily. When warnings regarding leap +# seconds appear, ignore them or regenerate the docker image. + && wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \ + && mkdir -p /usr/local/share/casacore/data \ + && cd /usr/local/share/casacore/data \ + && tar xfz /WSRT_Measures.ztar \ + && rm /WSRT_Measures.ztar +ADD . /code +RUN useradd -ms /bin/bash casacore \ + && chown casacore.casacore /code +USER casacore +RUN mkdir /code/build +WORKDIR /code/build +RUN cmake .. \ + -DBUILD_TESTING=ON \ + -DUSE_OPENMP=OFF \ + -DUSE_HDF5=ON \ + -DBUILD_PYTHON=OFF \ + -DBUILD_PYTHON3=ON \ + -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \ + -DDATA_DIR=/usr/local/share/casacore/data \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + && make -j`nproc` +USER root +RUN make install +USER casacore diff --git a/docker/ubuntu2204_gcc.docker b/docker/ubuntu2204_gcc.docker new file mode 100644 index 00000000000..b862785f487 --- /dev/null +++ b/docker/ubuntu2204_gcc.docker @@ -0,0 +1,52 @@ +FROM ubuntu:22.04 +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -y \ + gcc \ + g++ \ + cmake \ + flex \ + bison \ + libblas-dev \ + liblapack-dev \ + libcfitsio-dev \ + wcslib-dev \ + libfftw3-dev \ + gfortran \ + libncurses5-dev \ + libreadline6-dev \ + libhdf5-serial-dev \ + libboost-dev \ + libboost-python-dev \ + libboost-test-dev \ + libgsl-dev \ + python-is-python3 \ + python3-numpy \ + wget \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ +# Install WSRT Measures (extra casacore data, for tests) +# Note: The file on the ftp site is updated daily. When warnings regarding leap +# seconds appear, ignore them or regenerate the docker image. + && wget -nv -O /WSRT_Measures.ztar ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar \ + && mkdir -p /usr/local/share/casacore/data \ + && cd /usr/local/share/casacore/data \ + && tar xfz /WSRT_Measures.ztar \ + && rm /WSRT_Measures.ztar +ADD . /code +RUN useradd -ms /bin/bash casacore \ + && chown casacore.casacore /code +USER casacore +RUN mkdir /code/build +WORKDIR /code/build +RUN cmake .. \ + -DBUILD_TESTING=ON \ + -DUSE_OPENMP=OFF \ + -DUSE_HDF5=ON \ + -DBUILD_PYTHON=OFF \ + -DBUILD_PYTHON3=ON \ + -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \ + -DDATA_DIR=/usr/local/share/casacore/data \ + && make -j`nproc` +USER root +RUN make install +USER casacore