diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 909db320..9f2cab0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,28 +1,35 @@ # Github actions CI file # Ryan Mulhall 2020 -# Builds and runs make check in two containers, one with mpi, one without +# CI testing for the FRE-NCtools repo, builds and runs unit tests +# container @ https://hub.docker.com/repository/docker/ryanmulhall/fre-nctools-base name: FRE-NCtools CI on: [push, pull_request] jobs: - build: + CI: runs-on: ubuntu-latest strategy: matrix: with_mpi: ['','--with-mpi'] enable_quad_precision: ['', '--enable-quad-precision'] - env: + container: + image: ryanmulhall/fre-nctools-base + env: MPI: ${{ matrix.with_mpi }} QUAD_P: ${{ matrix.enable_quad_precision }} steps: - name: Checkout uses: actions/checkout@v2 - - name: Build container - run: docker build . -t fre-nctools - - name: Build and run tests - run: docker run -u root --entrypoint "/bin/sh" --env MPI --env QUAD_P fre-nctools /build.sh + - name: Configure + run: | + autoreconf -i configure.ac + ./configure $MPI $QUAD_P + - name: Build tools + run: make + - name: Run tests + run: make -j check LOG_DRIVER_FLAGS=--comments - name: Save log file on failure uses: actions/upload-artifact@v2.2.1 if: failure() with: - name: test-suite.log - path: t/test-suite.log + name: test-suite.log + path: t/test-suite.log diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b1b2984a..00000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:xenial -## install dependencies -RUN apt-get update \ - && apt-get -y install software-properties-common \ - && add-apt-repository ppa:remik-ziemlinski/nccmp --update \ - && apt-get install -y libnetcdf-dev libnetcdff-dev netcdf-bin gfortran bats \ - nccmp autoconf libopenmpi-dev openmpi-bin -## copy repo into container -COPY . . -## run tests -ENTRYPOINT ["build.sh"] diff --git a/build.sh b/build.sh deleted file mode 100755 index 789ee5c6..00000000 --- a/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#Builds FRE-NCtools and runs regression tests -autoreconf -i configure.ac -./configure $MPI $QUAD_P -make -j check LOG_DRIVER_FLAGS=--comments