From 004000647a3c3285e70d0ac04a7f8d283f4233c1 Mon Sep 17 00:00:00 2001 From: Tammo Jan Dijkema Date: Fri, 6 Sep 2024 12:45:57 +0200 Subject: [PATCH] Add github action --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f5f28ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Build and test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Apt install required packages + run: | + sudo apt install -y casacore-dev build-essential cmake wget libhdf5-dev + - name: Get measures data + run: | + mkdir ${HOME}/casacore-data && pushd ${HOME}/casacore-data + wget -q ftp://anonymous@ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar + tar xf WSRT_Measures.ztar + echo "measures.directory: ~/casacore-data" > ${HOME}/.casarc + popd + - name: Build and install + run: | + mkdir build + pushd build + cmake .. + cmake --build .. + popd + - name: Test PyBDSF + run: | + pushd build + make test + popd