CI: Create a Cygwin workflow #42
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
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: [1, 2, 3] | |
nesting: [0, 1] | |
chemistry: [0, 1] | |
hydrology: [0, 1] | |
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/dash ./configure gfort; fi' || '' }} | |
- 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 |