2020
2121 env :
2222 mhkit-python-dir : " MHKiT-Python"
23- MHKIT_PYTHON_VERSION : ' 0.7 .0'
23+ MHKIT_PYTHON_VERSION : ' 0.9 .0'
2424 steps :
2525 - name : Install & Setup Miniconda
2626 uses : conda-incubator/setup-miniconda@v3
@@ -29,32 +29,17 @@ jobs:
2929 auto-update-conda : true
3030 python-version : ${{ matrix.python-version }}
3131 activate-environment : mhkit_conda_env
32- channels : conda-forge
32+ channels : conda-forge,defaults
3333
3434 - name : " Conda install netcdf4, hdf5"
3535 shell : bash -l {0}
3636 run : |
3737 conda activate mhkit_conda_env
38- conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
39- # conda install netcdf4 hdf5
40- # export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
38+ conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
4139
4240 - name : Check out MHKiT-MATLAB
4341 uses : actions/checkout@v4
4442
45- # - name: Check out MHKiT-Python
46- # uses: actions/checkout@v4
47- # with:
48- # repository: "MHKiT-Software/MHKiT-Python"
49- # path: ${{env.mhkit-python-dir}}
50-
51- # - name: pip install mhkit module from source
52- # shell: bash -l {0}
53- # run: |
54- # conda activate mhkit_conda_env
55- # pip install -e .
56- # working-directory: ${{env.mhkit-python-dir}}
57-
5843 - name : pip install mhkit from pypi
5944 shell : bash -l {0}
6045 run : |
7257 run : |
7358 conda activate mhkit_conda_env
7459 pip uninstall -y scipy
75- pip install scipy==1.10.1
60+ pip install scipy==1.12.0
7661
7762 - name : List installed pip modules
7863 shell : bash -l {0}
@@ -136,64 +121,38 @@ jobs:
136121 strategy :
137122 fail-fast : false
138123
139- # Expecting 2 * 4 * 7 - (13 * 2) = 30 jobs
140124 matrix :
141125 os : [macos-13, ubuntu-latest]
142- python-version : [3.8, 3.9, "3.10", 3.11]
126+ python-version : ["3.10", 3.11, 3.12 ]
143127 # Note: It is preferred to use an actual release name as opposed to 'latest'
144- matlab-version : [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
145- mhkit-python-version : ["0.7 .0"]
128+ matlab-version : [R2022b, R2023a, R2023b, R2024a, R2024b ]
129+ mhkit-python-version : ["0.9 .0"]
146130 exclude :
147131 - python-version : " 3.10" # cache_population job
148132 matlab-version : R2022b
149133 os : ubuntu-latest
150- - matlab-version : R2024a # Non compatiable versions of Python and MATLAB
151- python-version : 3.8
134+ # Python 3.12 + MATLAB incompatability
135+ - matlab-version : R2024a
136+ python-version : 3.12
152137 - matlab-version : R2023b
153- python-version : 3.8
138+ python-version : 3.12
154139 - matlab-version : R2023a
155- python-version : 3.11
140+ python-version : 3.12
156141 - matlab-version : R2022b
142+ python-version : 3.12
143+ # Python 3.11 + MATLAB incompatability
144+ - matlab-version : R2023a
157145 python-version : 3.11
158- - matlab-version : R2022a
159- python-version : 3.11
160- - matlab-version : R2022a
161- python-version : " 3.10"
162- - matlab-version : R2021b
163- python-version : 3.11
164- - matlab-version : R2021b
165- python-version : " 3.10"
166- - matlab-version : R2021a
167- python-version : 3.11
168- - matlab-version : R2021a
169- python-version : " 3.10"
170- - matlab-version : R2021a
171- python-version : 3.9
172- - matlab-version : R2020b
146+ - matlab-version : R2022b
173147 python-version : 3.11
174- - matlab-version : R2020b
175- python-version : " 3.10"
176- - matlab-version : R2020b
177- python-version : 3.9
178- # Specific versions of tests that fail consistently. Most likely due to the GitHub actions environment
179- # - matlab-version: R2024a # Python netcdf4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123413351
180- # python-version: 3.11
181- # os: macos-13
182- # - matlab-version: R2024a # Working!
183- # python-version: "3.10"
184- # os: macos-13
185- # - matlab-version: R2024a # Java Segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411604
186- # python-version: 3.9
187- # os: macos-13
188- # - matlab-version: R2023b # Python netcd4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412889
189- # python-version: 3.11
190- # os: macos-13
191- # - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412352
192- # python-version: "3.10"
193- # os: macos-13
194- # - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411335
195- # python-version: 3.9
196- # os: macos-13
148+ # Specific MATLAB/Python/OS Errors
149+ # Error using _cythonized_array_utils>init
150+ # scipy.linalg._cythonized_array_utils (line 1)
151+ # Python Error: ValueError: numpy.dtype size changed, may indicate binary
152+ # incompatibility. Expected 96 from C header, got 88 from PyObject
153+ - matlab-version : R2024b
154+ python-version : 3.12
155+ os : macos-13
197156
198157 runs-on : ${{ matrix.os }}
199158
@@ -204,62 +163,21 @@ jobs:
204163 - name : Check out MHKiT-MATLAB
205164 uses : actions/checkout@v4
206165
207- # - name: Check out MHKiT-Python
208- # uses: actions/checkout@v4
209- # with:
210- # repository: "MHKiT-Software/MHKiT-Python"
211- # path: ${{env.mhkit-python-dir}}
212-
213166 - name : Install & Setup Miniconda
214167 uses : conda-incubator/setup-miniconda@v3
215168 with :
216169 miniconda-version : latest
217170 auto-update-conda : true
218171 python-version : ${{ matrix.python-version }}
219172 activate-environment : mhkit_conda_env
220- channels : conda-forge
173+ channels : conda-forge,defaults
221174
222175 # This is necessary to fix any issues with netcdf4 and hdf5 headers
223176 - name : " Conda install netcdf4, hdf5"
224177 shell : bash -l {0}
225178 run : |
226179 conda activate mhkit_conda_env
227- conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
228- # conda install netcdf4 hdf5
229- # export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
230-
231- # - name: Setup Python ${{ matrix.python-version }}
232- # shell: bash -l {0}
233- # run: |
234- # conda create --name mhkit_conda_env python=${{ matrix.python-version }} numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
235- # conda activate mhkit_conda_env
236- # export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
237- # pip install -e . --no-deps --force-reinstall
238-
239- # - name: Setup MHKiT Dependencies on macOS
240- # if: ${{ matrix.os == 'macos-13' }}
241- # run: brew install hdf5 netcdf
242-
243- # - name: Setup MHKiT Dependencies on ubuntu
244- # run: sudo apt install libhdf5-serial-dev libnetcdf-dev
245- # if: ${{ matrix.os == 'ubuntu-latest' }}
246-
247- # - name: Setup MHKiT Dependencies on ubuntu
248- # if: ${{ matrix.os == 'ubuntu-latest' }}
249- # run: |
250- # sudo apt update
251- # sudo apt upgrade
252- # sudo apt install build-essential
253-
254- # - name: Print GCC Version
255- # if: ${{ matrix.os == 'ubuntu-latest' }}
256- # run: |
257- # gcc --version
258- # g++ --version
259-
260- # - name: Setup MATLAB Path on Ubuntu
261- # if: ${{ matrix.os == 'ubuntu-latest' }}
262- # run: echo "export LD_LIBRARY_PATH=/usr/local/MATLAB/${{ matrix.matlab-version }}/sys/os/glnxa64" >> "$GITHUB_ENV"
180+ conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
263181
264182 - name : Setup MATLAB Path on Ubuntu
265183 if : ${{ matrix.os == 'ubuntu-latest' }}
@@ -277,14 +195,6 @@ jobs:
277195 conda activate mhkit_conda_env
278196 python --version
279197
280- # - name: pip install mhkit module from source
281- # working-directory: ${{env.mhkit-python-dir}}
282- # shell: bash -l {0}
283- # run: |
284- # conda activate mhkit_conda_env
285- # export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
286- # pip install -e .
287-
288198 - name : pip install mhkit from pypi
289199 shell : bash -l {0}
290200 run : |
@@ -310,7 +220,7 @@ jobs:
310220 run : |
311221 conda activate mhkit_conda_env
312222 pip uninstall -y scipy
313- pip install scipy==1.10.1
223+ pip install scipy==1.12.0
314224
315225 - name : List installed pip modules
316226 shell : bash -l {0}
@@ -345,6 +255,16 @@ jobs:
345255 with :
346256 release : ${{ matrix.matlab-version }}
347257
258+ - name : Configure OpenSSL for MacOS/MATLAB
259+ if : matrix.os == 'macos-13'
260+ shell : bash -l {0}
261+ run : |
262+ conda activate mhkit_conda_env
263+ conda install openssl=="3.0.*"
264+ CONDA_LIB_PATH=$(python -c "import sys; import os; print(os.path.join(os.path.dirname(sys.executable), 'lib'))")
265+ export DYLD_LIBRARY_PATH="$CONDA_LIB_PATH:$DYLD_LIBRARY_PATH"
266+ echo "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
267+
348268 - name : Add Python Dir to Path
349269 shell : bash -l {0}
350270 run : |
@@ -357,6 +277,10 @@ jobs:
357277 run : |
358278 conda activate mhkit_conda_env
359279 printf 'pyenv(Version="%s", ExecutionMode="OutOfProcess")\n' $(python -c "import sys; print(sys.executable)") >> run.m
280+ # Pass dynamic library paths to MATLAB only on macOS
281+ if [[ $OSTYPE == "darwin"* ]]; then
282+ echo "setenv('DYLD_LIBRARY_PATH', getenv('DYLD_LIBRARY_PATH'));" >> run.m
283+ fi
360284
361285 - name : Add MATLAB test commands
362286 shell : bash
0 commit comments