From 3a80c91d8e1d84f106df836883b21e1b7fa72cde Mon Sep 17 00:00:00 2001 From: rem1776 Date: Tue, 15 Dec 2020 16:33:20 -0500 Subject: [PATCH 1/6] Reworked github action to run entirely on container --- .github/workflows/main.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 909db320..7b49105d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,19 +10,25 @@ jobs: matrix: with_mpi: ['','--with-mpi'] enable_quad_precision: ['', '--enable-quad-precision'] - 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: Save log file on failure - uses: actions/upload-artifact@v2.2.1 - if: failure() - with: - name: test-suite.log - path: t/test-suite.log + 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: Configure for building + run: | + autoreconf -i configure.ac + ./configure $MPI $QUAD_P + - name: Compile and build tools + run: make + - name: Test + run: make -j distcheck + - name: Save log file on failure + uses: actions/upload-artifact@v2.2.1 + if: always() + with: + name: test-suite.log + path: t/test-suite.log From e066fc4f446d0368598e6cd30d1f37b0b8870462 Mon Sep 17 00:00:00 2001 From: rem1776 <35538242+rem1776@users.noreply.github.com> Date: Tue, 15 Dec 2020 16:41:16 -0500 Subject: [PATCH 2/6] fix issues with indentation --- .github/workflows/main.yml | 47 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b49105d..b429e7f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,6 @@ # Github actions CI file # Ryan Mulhall 2020 -# Builds and runs make check in two containers, one with mpi, one without -name: FRE-NCtools CI +# container @ https://hub.docker.com/repository/docker/ryanmulhall/fre-nctools-base on: [push, pull_request] jobs: build: @@ -10,25 +9,25 @@ jobs: matrix: with_mpi: ['','--with-mpi'] enable_quad_precision: ['', '--enable-quad-precision'] - 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: Configure for building - run: | - autoreconf -i configure.ac - ./configure $MPI $QUAD_P - - name: Compile and build tools - run: make - - name: Test - run: make -j distcheck - - name: Save log file on failure - uses: actions/upload-artifact@v2.2.1 - if: always() - with: - name: test-suite.log - path: t/test-suite.log + 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: Configure for building + run: | + autoreconf -i configure.ac + ./configure $MPI $QUAD_P + - name: Compile and build tools + run: make + - name: Test + run: make -j distcheck + - name: Save log file on failure + uses: actions/upload-artifact@v2.2.1 + if: always() + with: + name: test-suite.log + path: t/test-suite.log From a6f04af6d7b70fc5da55172959ff2fd55f63269c Mon Sep 17 00:00:00 2001 From: rem1776 Date: Tue, 15 Dec 2020 16:57:25 -0500 Subject: [PATCH 3/6] Deleted old files and changed test --- .github/workflows/main.yml | 8 ++++---- Dockerfile | 11 ----------- build.sh | 5 ----- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 Dockerfile delete mode 100755 build.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b429e7f4..881efd90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,14 +17,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Configure for building + - name: Configure run: | autoreconf -i configure.ac ./configure $MPI $QUAD_P - - name: Compile and build tools + - name: Build tools run: make - - name: Test - run: make -j distcheck + - name: Run tests + run: make -j check - name: Save log file on failure uses: actions/upload-artifact@v2.2.1 if: always() 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 From 5bca704400201f11a01003db94ac780cb4d1f8e3 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Wed, 16 Dec 2020 10:42:43 -0500 Subject: [PATCH 4/6] Makes log file save only on failure --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 881efd90..c53823d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ # Github actions CI file # Ryan Mulhall 2020 +# 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: @@ -27,7 +29,7 @@ jobs: run: make -j check - name: Save log file on failure uses: actions/upload-artifact@v2.2.1 - if: always() + if: failure() with: name: test-suite.log path: t/test-suite.log From 4cac152edf1d00b0cc08ee7f2e25f10499ede3ce Mon Sep 17 00:00:00 2001 From: rem1776 <35538242+rem1776@users.noreply.github.com> Date: Wed, 16 Dec 2020 10:45:25 -0500 Subject: [PATCH 5/6] Fixes error with name --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c53823d1..89d0f30c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,10 +2,10 @@ # Ryan Mulhall 2020 # 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 +name: FRE-NCtools CI on: [push, pull_request] jobs: - build: + CI: runs-on: ubuntu-latest strategy: matrix: From 59fe9433b8ddb931b3a4c740bcb49f9138aa0ab1 Mon Sep 17 00:00:00 2001 From: rem1776 <35538242+rem1776@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:03:04 -0500 Subject: [PATCH 6/6] Add flag to make check --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89d0f30c..9f2cab0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Build tools run: make - name: Run tests - run: make -j check + run: make -j check LOG_DRIVER_FLAGS=--comments - name: Save log file on failure uses: actions/upload-artifact@v2.2.1 if: failure()