-
Notifications
You must be signed in to change notification settings - Fork 8
125 lines (109 loc) · 3.52 KB
/
integration.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
name: Integration testing
on:
push:
branches:
- main
- develop*
- ci-diagnose*
paths-ignore:
- '**.md'
pull_request:
branches:
- main
- develop
paths-ignore:
- '**.md'
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
jobs:
test_modflow:
name: MODFLOW 6 integration tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, macos-latest, windows-2019 ]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout action
uses: actions/checkout@v3
with:
path: executables
- name: Checkout modflow6
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6
path: modflow6
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: modflow6/environment.yml
- name: Setup ifort
uses: modflowpy/install-intelfortran-action@v1
# with:
# path: ${{ runner.os != 'Windows' && 'bin' || 'C:\Program Files (x86)\Intel\oneAPI' }}
- name: Fix Micromamba path (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
# https://github.com/modflowpy/install-intelfortran-action#conda-scripts
$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 (Linux & Mac)
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson compile -v -C builddir
meson install -C builddir
# - name: Show meson build log
# run: cat modflow6/builddir/meson-logs/meson-log.txt
- name: Update FloPy
working-directory: modflow6/autotest
run: python update_flopy.py
- name: Get executables
if: runner.os != 'Windows'
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
pytest -v -s get_exes.py
sudo rm -rf ../bin/downloaded/*
- name: Get executables
if: runner.os == 'Windows'
shell: pwsh
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
pytest -v -s get_exes.py
rm -Force ../bin/downloaded/*
- name: Show pymake version
run: |
pip show mfpymake
python -c "import pymake; print(pymake.__version__)"
- name: Build executables
if: runner.os != 'Windows'
working-directory: executables/scripts
run: python build_executables.py -p ../../modflow6/bin/downloaded
- name: Build executables
if: runner.os == 'Windows'
shell: cmd
working-directory: executables/scripts
run: python build_executables.py -p ../../modflow6/bin/downloaded
# - name: Build executables
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 40
# max_attempts: 5
# command: |
# cd modflow6/bin/downloaded
# python ../../../scripts/build_executables.py
- name: Set executable permission
if: runner.os != 'Windows'
working-directory: modflow6/bin/downloaded
run: sudo chmod +x *
- name: Test modflow6
working-directory: modflow6/autotest
run: pytest -v -n auto --durations 0