CI workflow updates and migrate container #208
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GNU ci run on pull requests, checks more configure options than intel | |
# does a distcheck (builds, tests, check install) | |
# image created off dockerfile in repo, compile/link flags are set there | |
name: Build libFMS test with autotools | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
conf-flag: [ --disable-openmp, --enable-mixed-mode, --disable-setting-flags, --with-mpi=no] | |
input-flag: [--with-yaml, --enable-test-input=/home/unit_tests_input] | |
target-fcflags: [ "-O2 -fno-expensive-optimizations", "-O0 -g -W -fbounds-check -ffpe-trap=invalid,zero,overflow"] # prod, debug | |
target-cflags: [ "-O2", "-O0"] # prod, debug | |
exclude: | |
- conf-flag: --with-mpi=no | |
input-flag: --enable-test-input=/home/unit_tests_input | |
- target-fcflags: "-O2 -fno-expensive-optimizations" | |
target-cflags: "-O0" | |
- target-fcflags: "-O0 -g -W -fbounds-check -ffpe-trap=invalid,zero,overflow" | |
target-cflags: "-O2" | |
container: | |
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:12.3.0 | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.github_token }} | |
env: | |
TEST_VERBOSE: 1 | |
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }}" | |
TARGET_FLAGS: "${{ matrix.target-fcflags }} ${{ matrix.target-cflags }}" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Prepare GNU autoconf for build | |
run: autoreconf -if | |
- name: Configure the build | |
if: ${{ matrix.conf-flag != '--disable-setting-flags' }} | |
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="${TARGET_FLAGS} ${FCFLAGS}" | |
- name: Configure the build with compiler flags | |
if: ${{ matrix.conf-flag == '--disable-setting-flags' }} | |
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include ${FCFLAGS} ${TARGET_FLAGS}" | |
- name: Build the library | |
run: make distcheck | |
if: ${{ matrix.conf-flag != '--with-mpi=no' }} | |
- name: Build the library (without test suite for serial build) | |
run: make | |
if: ${{ matrix.conf-flag == '--with-mpi=no' }} |