forked from MODFLOW-USGS/modflow6
-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (131 loc) · 4.09 KB
/
ci3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: MODFLOW 6 continuous integration
on:
push:
branches:
- master
- develop
- ci-diagnose*
- ncci
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
branches:
- master
- develop
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
netcdf_test_win:
name: netcdf4 testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-2022 ]
#hdf5: [ 1.12.2 ]
#netcdf: [ v4.7.4, v4.8.1, v4.9.0, main ]
#netcdf: [ v4.9.0, main ]
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: |
git
make
mingw-w64-x86_64-gcc
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-python-pytest
- name: Setup GNU Fortran ${{ env.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}
- name: Install System dependencies
shell: msys2 {0}
run: |
pacman -Syu
pacman -S --noconfirm --needed base-devel unzip mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-cmake
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: modflow6/environment.yml
create-args: >-
pkg-config
netcdf-fortran
init-shell: >-
bash
powershell
cache-environment: true
cache-downloads: true
- name: Build modflow6
working-directory: modflow6
run: |
#echo "LD_LIBRARY_PATH=/d/a/_temp/msys64/mingw64/lib" >> $GITHUB_ENV
#echo "PATH=/d/a/_temp/msys64/mingw64/bin" >> $GITHUB_ENV
#echo "PATH=/d/a/_temp/msys64/mingw64/bin:/d/a/modflow6/modflow6/modflow6/bin:/d/a/modflow6/modflow6/ncf/netcdf-fortran-4.6.0/fortran/.libs" >> $GITHUB_ENV
find /c/Users/runneradmin/micromamba/envs | grep -i netcdf
which nf-config
which nc-config
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
- name: Show Meson logs
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt
- name: Check exe
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
which dumpbin
which dumpbin.exe
echo "LD_LIBRARY_PATH:"
echo $LD_LIBRARY_PATH
echo "PATH:"
echo $PATH
ls -l /d/a/modflow6/modflow6/modflow6/bin
echo "FILE:"
file /d/a/modflow6/modflow6/modflow6/bin/mf6.exe
echo "LDD1:"
ldd /d/a/modflow6/modflow6/modflow6/bin/mf6.exe
which mf6.exe
#mf6.exe
DYLD_LIBRARY_PATH=/d/a/modflow6/modflow6/modflow6/bin mf6.exe --version
- name: Update flopy
working-directory: modflow6/autotest
run: python update_flopy.py
- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py
- name: Test nc4 program
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
pytest -v test_gwf_chd01.py -s --keep temp
cat temp/test_mf6model[chd01]0/mfsim.lst | grep -i netcdf
- name: Test programs
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
branch="${{ github.ref_name }}"
marker="not large"
markers=$([ "$branch" == "master" ] && echo "$marker and not developmode" || echo "$marker")
pytest -v -n auto --durations 0 -m "$markers"