diff --git a/.github/workflows/cygwin-compile.yml b/.github/workflows/cygwin-compile.yml new file mode 100644 index 0000000000..ed10f2b199 --- /dev/null +++ b/.github/workflows/cygwin-compile.yml @@ -0,0 +1,81 @@ +name: Check Cygwin Compile + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + + runs-on: windows-latest + env: + SHELLOPTS: igncr:pipefail + CYGWIN_NOWINPATH: 1 + CHERE_INVOKING: 1 + NETCDF: /usr + NETCDF4: 1 + WRFIO_NCD_NO_LARGE_FILE_SUPPORT: 0 + WRF_CHEM: ${{ matrix.chemistry }} + FLEX_LIB_DIR: /usr/lib + YACC: "/usr/bin/yacc -d" + WRF_HYDRO: ${{ matrix.hydrology }} + + strategy: + max-parallel: 4 + matrix: + parallelization: [3, 1, 2] + nesting: [0, 1] + chemistry: [0, 1] + hydrology: [0, 1] + exclude: + - hydrology: 1 + parallelization: 1 + - hydrology: 1 + parallelization: 2 + + steps: + - name: Line-ending normalization + run: git config --global core.autocrlf input + + - uses: actions/checkout@v4 + + - uses: cygwin/cygwin-install-action@v4 + with: + packages: >- + gcc-core gcc-fortran + libnetcdf-fortran-devel libnetcdf-devel libhdf5-devel zlib-devel + ${{ matrix.parallelization >= 3 && 'openmpi libopenmpi-devel libhwloc-devel libevent-devel' || '' }} + libjasper-devel + perl perl_base tcsh m4 make sed + gawk tar gzip coreutils which file grep + libtirpc-devel + ${{ matrix.chemistry && 'flex bison' || '' }} + + - name: configure + shell: 'C:\cygwin\bin\bash.exe -o igncr -eo pipefail {0}' + # Options: + # 1 serial 2 smpar 3 dmpar 4 dm+sm + # Nesting? 0 none 1 basic 2 preset move 3 vortex-following + run: | + ${{ matrix.hydrology == 1 && 'source hydro/template/setEnvar.sh' || '' }} + echo ${{ matrix.parallelization }}$'\n'${{ matrix.nesting }} | /bin/dash ./configure arw + if [ -f tools/nc4_test.log ] ; then cat tools/nc4_test.log; fi + test -f configure.wrf + ${{ matrix.hydrology == 1 && 'if [ ! -f hydro/Makefile.comm ] ; then cd hydro && /bin/bash -ex ./configure gfort && cd ..; fi' || '' }} + pwd + ls hydro + ${{ matrix.hydrology == 1 && 'test -f hydro/Makefile.comm' || '' }} + + - name: Compile + shell: 'C:\cygwin\bin\bash.exe -o igncr -eo pipefail {0}' + run: | + ${{ matrix.hydrology == 1 && 'source hydro/template/setEnvar.sh' || '' }} + ./compile em_real + ls main/*.exe + ls test/em_real/real.exe diff --git a/arch/configure.defaults b/arch/configure.defaults index 36ca1b6e00..810c26624f 100644 --- a/arch/configure.defaults +++ b/arch/configure.defaults @@ -1994,7 +1994,7 @@ FCDEBUG = # -g $(FCNOOPT) # -ggdb -fbacktrace FORMAT_FIXED = -ffixed-form FORMAT_FREE = -ffree-form -ffree-line-length-none FCSUFFIX = -FCCOMPAT = +FCCOMPAT = -fallow-argument-mismatch -fallow-invalid-boz BYTESWAPIO = -fconvert=big-endian -frecord-marker=4 FCBASEOPTS_NO_G = -w $(FORMAT_FREE) $(BYTESWAPIO) $(FCCOMPAT) FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG) diff --git a/hydro/configure b/hydro/configure index ce896c95fe..7e8b85719e 100755 --- a/hydro/configure +++ b/hydro/configure @@ -96,6 +96,9 @@ if [[ "$theArgument" == "2" ]] || [[ "$theArgument" == "gfort" ]]; then cp arc/macros.mpp.gfort macros cp arc/Makefile.mpp Makefile.comm echo "Configured: gfort" + pwd + ls -lh Makefile.comm + file Makefile.comm fi if [[ "$theArgument" == "3" ]] || [[ "$theArgument" == "ifort" ]]; then @@ -178,6 +181,7 @@ if [[ -e macros.tmp ]]; then rm -f macros.tmp mv macros.a macros fi +test -f Makefile.comm ## success exit 0