-
Notifications
You must be signed in to change notification settings - Fork 117
116 lines (104 loc) · 3.92 KB
/
large.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
name: MODFLOW 6 large models
on:
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
jobs:
# caching only necessary on Windows
cache_ifort:
name: Cache Intel OneAPI compilers
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ifx
- {os: windows-2022, compiler: intel, version: 2022.2}
# ifort
- {os: windows-2022, compiler: intel-classic, version: "2021.10"}
- {os: windows-2022, compiler: intel-classic, version: 2021.9}
- {os: windows-2022, compiler: intel-classic, version: 2021.8}
- {os: windows-2022, compiler: intel-classic, version: 2021.7}
- {os: windows-2022, compiler: intel-classic, version: 2021.6}
steps:
- name: Setup ${{ matrix.compiler }} ${{ matrix.version }}
uses: awvwgk/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
test:
name: Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- {compiler: gcc, version: 13, repo: examples}
- {compiler: gcc, version: 13, repo: largetestmodels}
- {compiler: intel, version: 2022.2.1, repo: examples}
- {compiler: intel, version: 2022.2.1, repo: largetestmodels}
- {compiler: intel-classic, version: 2021.6, repo: examples}
- {compiler: intel-classic, version: 2021.6, repo: largetestmodels}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout modflow6
uses: actions/checkout@v4
with:
path: modflow6
- name: Checkout modflow6-${{ matrix.repo }}
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/modflow6-${{ matrix.repo }}
path: modflow6-${{ matrix.repo }}
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: modflow6/environment.yml
cache-downloads: true
cache-environment: true
- name: Setup compilers (${{ matrix.compiler }} ${{ matrix.version }})
uses: awvwgk/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Cache modflow6 examples
id: cache-examples
uses: actions/cache@v3
with:
path: modflow6-examples/examples
key: modflow6-examples-${{ hashFiles('modflow6-examples/scripts/**') }}
- name: Install extra Python packages
if: matrix.repo == 'examples' && steps.cache-examples.outputs.cache-hit != 'true'
working-directory: modflow6-examples/etc
run: |
pip install -r requirements.pip.txt
- name: Build example models
if: matrix.repo == 'examples' && steps.cache-examples.outputs.cache-hit != 'true'
working-directory: modflow6-examples/etc
run: |
python ci_build_files.py
ls -lh ../examples/
- name: Add Micromamba Scripts dir to path (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
# add micromamba scripts dir to system path
$mamba_bin = "C:\Users\runneradmin\micromamba-root\envs\modflow6\Scripts"
echo $mamba_bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py
- name: Update flopy
working-directory: modflow6/autotest
run: python update_flopy.py
- name: Run tests
working-directory: modflow6/autotest
run: pytest -v -n auto --durations 0 test_z03_${{ matrix.repo }}.py