From 185aae99fbbe485494b16b825144c952234adcc9 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Fri, 14 Jan 2022 16:06:31 +0200 Subject: [PATCH 1/2] lets see if this works --- .github/workflows/docker.yml | 32 +++++++++++++++++ .travis.yml | 11 ------ .travis/clang.docker | 70 ------------------------------------ .travis/gcc.docker | 67 ---------------------------------- CMakeLists.txt | 4 +-- README.md | 22 +++--------- docker/clang.docker | 32 +++++++++++++++++ docker/gcc.docker | 29 +++++++++++++++ 8 files changed, 99 insertions(+), 168 deletions(-) create mode 100644 .github/workflows/docker.yml delete mode 100644 .travis.yml delete mode 100644 .travis/clang.docker delete mode 100644 .travis/gcc.docker create mode 100644 docker/clang.docker create mode 100644 docker/gcc.docker diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..a18232e --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,32 @@ +name: ci + +on: + push: + branches: + - 'master' + tags: + - '*' + pull_request: + branches: + - 'master' + +jobs: + docker: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: [gcc, clang] + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + file: docker/${{ matrix.compiler }}.docker + with: + push: false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8c198b4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -os: linux -language: cpp -services: [docker] -sudo: true -compiler: - - clang - - gcc -before_script: - - docker build . -f .travis/${CC}.docker -t casarest/${CC} -script: - - echo Done \ No newline at end of file diff --git a/.travis/clang.docker b/.travis/clang.docker deleted file mode 100644 index 0c63be7..0000000 --- a/.travis/clang.docker +++ /dev/null @@ -1,70 +0,0 @@ -FROM kernsuite/base:5 -RUN docker-apt-install \ - build-essential \ - clang \ - cmake \ - libhdf5-dev \ - libboost-all-dev \ - wcslib-dev \ - libcfitsio-dev \ - libboost-system-dev \ - libboost-thread-dev \ - libblas-dev \ - liblapack-dev \ - libncurses5-dev \ - libsofa1-dev \ - bison \ - libbison-dev \ - flex \ - libreadline6-dev \ - gfortran \ - python-dev \ - python3-dev \ - python-numpy \ - python3-numpy \ - wget - -##################################################################### -## Get CASACORE ephem data -##################################################################### -RUN mkdir -p /usr/share/casacore/data/ -WORKDIR /usr/share/casacore/data/ -RUN docker-apt-install rsync -RUN rsync -avz rsync://casa-rsync.nrao.edu/casa-data . - -##################################################################### -## BUILD CASACORE FROM SOURCE -##################################################################### -RUN mkdir /src -WORKDIR /src -RUN wget https://github.com/casacore/casacore/archive/v3.3.0.tar.gz -RUN tar xvf v3.3.0.tar.gz -RUN mkdir casacore-3.3.0/build -WORKDIR /src/casacore-3.3.0/build -RUN cmake \ - -DUSE_FFTW3=ON \ - -DBUILD_TESTING=OFF \ - -DUSE_OPENMP=OFF \ - -DUSE_HDF5=ON \ - -DBUILD_PYTHON=ON \ - -DBUILD_PYTHON3=ON \ - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} ../ \ - -DDATA_DIR=/usr/share/casacore/data -RUN make -j 4 -RUN make install -RUN ldconfig - -##################################################################### -## BUILD CASAREST -##################################################################### - -ADD . /code -RUN mkdir /code/build -WORKDIR /code/build -RUN cmake .. \ - -DBUILD_TESTING=ON \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -RUN make -j 4 -RUN make test -RUN make install diff --git a/.travis/gcc.docker b/.travis/gcc.docker deleted file mode 100644 index f4f7eba..0000000 --- a/.travis/gcc.docker +++ /dev/null @@ -1,67 +0,0 @@ -FROM kernsuite/base:5 -RUN docker-apt-install \ - build-essential \ - cmake \ - libhdf5-dev \ - libboost-all-dev \ - wcslib-dev \ - libcfitsio-dev \ - libboost-system-dev \ - libboost-thread-dev \ - libblas-dev \ - liblapack-dev \ - libncurses5-dev \ - libsofa1-dev \ - bison \ - libbison-dev \ - flex \ - libreadline6-dev \ - gfortran \ - python-dev \ - python3-dev \ - python-numpy \ - python3-numpy \ - wget - -##################################################################### -## Get CASACORE ephem data -##################################################################### -RUN mkdir -p /usr/share/casacore/data/ -WORKDIR /usr/share/casacore/data/ -RUN docker-apt-install rsync -RUN rsync -avz rsync://casa-rsync.nrao.edu/casa-data . - -##################################################################### -## BUILD CASACORE FROM SOURCE -##################################################################### -RUN mkdir /src -WORKDIR /src -RUN wget https://github.com/casacore/casacore/archive/v3.3.0.tar.gz -RUN tar xvf v3.3.0.tar.gz -RUN mkdir casacore-3.3.0/build -WORKDIR /src/casacore-3.3.0/build -RUN cmake \ - -DUSE_FFTW3=ON \ - -DBUILD_TESTING=OFF \ - -DUSE_OPENMP=OFF \ - -DUSE_HDF5=ON \ - -DBUILD_PYTHON=ON \ - -DBUILD_PYTHON3=ON \ - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} ../ \ - -DDATA_DIR=/usr/share/casacore/data -RUN make -j 4 -RUN make install -RUN ldconfig - -##################################################################### -## BUILD CASAREST -##################################################################### - -ADD . /code -RUN mkdir /code/build -WORKDIR /code/build -RUN cmake .. \ - -DBUILD_TESTING=ON -RUN make -j 4 -RUN make test -RUN make install diff --git a/CMakeLists.txt b/CMakeLists.txt index b827faa..7e3a9b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8) # project version set( ${PROJECT_NAME}_MAJOR_VERSION 1 ) -set( ${PROJECT_NAME}_MINOR_VERSION 7 ) +set( ${PROJECT_NAME}_MINOR_VERSION 8 ) set( ${PROJECT_NAME}_PATCH_LEVEL 0 ) if (UseCasaNamespace) @@ -54,7 +54,7 @@ include (CTest) # Determine which external packages to use. # dependencies -find_package(CasaCore 3.2 REQUIRED) +find_package(CasaCore 3.4 REQUIRED) find_package(CFITSIO 3.030 REQUIRED) # Should pad to three decimal digits find_package(WCSLIB 4.7 REQUIRED) # needed for CASA find_package(BLAS REQUIRED) diff --git a/README.md b/README.md index 35fec34..2fa0686 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,13 @@ To compile casarest you need to meet the following requirements: * cmake * g++ -* casacore (3.0 or later) +* casacore (3.4 or later) * boost * wcslib * cfitsio * fortran * hdf5 (optional) -If you are still at casacore 2.0 then use casarest 1.4.2. - On Debian / Ubuntu you can install these with: ``` @@ -76,19 +74,11 @@ cmake -DCOMPONENT= -P cmake_install.cmake Which will build and install only your choice of target. -## Ubuntu 14.04 packages - -If you run Ubuntu 14.04 you can use precompiled binary packages +## KERN packages -https://launchpad.net/~radio-astro/+archive/ubuntu/main +If you run Ubuntuyou can use precompiled binary packages -installation commands: -``` -sudo apt-get install software-properties-common -sudo add-apt-repository ppa:radio-astro/main -sudo apt-get update -sudo apt-get install casarest -``` +https://kernsuite.info/ # Problems & bugs @@ -96,7 +86,3 @@ sudo apt-get install casarest If you have any issues compiling or using casacore, please open an issue on the issue tracker on github. - -# travis - -[![Build Status](https://travis-ci.org/casacore/casarest.svg?branch=master)](https://travis-ci.org/casacore/casarest) diff --git a/docker/clang.docker b/docker/clang.docker new file mode 100644 index 0000000..b8fc769 --- /dev/null +++ b/docker/clang.docker @@ -0,0 +1,32 @@ +FROM kernsuite/base:7 +RUN docker-apt-install \ + build-essential \ + clang \ + cmake \ + casacore-dev \ + libhdf5-dev \ + libboost-all-dev \ + wcslib-dev \ + libcfitsio-dev \ + libboost-system-dev \ + libboost-thread-dev \ + libblas-dev \ + liblapack-dev \ + libncurses5-dev \ + libmysofa-dev \ + bison \ + libbison-dev \ + flex \ + libreadline6-dev \ + gfortran + +ADD . /code +RUN mkdir /code/build +WORKDIR /code/build +RUN cmake .. \ + -DBUILD_TESTING=ON \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ +RUN make -j 4 +RUN make test +RUN make install diff --git a/docker/gcc.docker b/docker/gcc.docker new file mode 100644 index 0000000..098a310 --- /dev/null +++ b/docker/gcc.docker @@ -0,0 +1,29 @@ +FROM kernsuite/base:7 + +RUN docker-apt-install \ + build-essential \ + cmake \ + casacore-dev \ + libhdf5-dev \ + libboost-all-dev \ + wcslib-dev \ + libcfitsio-dev \ + libboost-system-dev \ + libboost-thread-dev \ + libblas-dev \ + liblapack-dev \ + libncurses5-dev \ + libmysofa-dev \ + bison \ + libbison-dev \ + flex \ + libreadline6-dev \ + gfortran + +ADD . /code +RUN mkdir /code/build +WORKDIR /code/build +RUN cmake .. -DBUILD_TESTING=ON +RUN make -j 4 +RUN make test +RUN make install From 07cae13821d505fcd0d681c5ef4b49ebe6a21175 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Fri, 14 Jan 2022 16:08:38 +0200 Subject: [PATCH 2/2] fix error --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a18232e..1159bbd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,6 +27,6 @@ jobs: name: Build and push id: docker_build uses: docker/build-push-action@v2 - file: docker/${{ matrix.compiler }}.docker with: - push: false \ No newline at end of file + push: false + file: docker/${{ matrix.compiler }}.docker \ No newline at end of file