Repository navigation
82 lines (80 loc) · 3.06 KB
/
Copy pathmatlab-reference.yml
File metadata and controls
82 lines (80 loc) · 3.06 KB
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
name: MATLAB reference parity
on:
push:
paths:
- '.github/workflows/matlab-reference.yml'
- 'tests/matlab/regular_wave_reference.m'
- 'tests/matlab/imported_spectrum_two_column_reference.m'
- 'tests/matlab/core_hydro_preprocess_reference.m'
- 'tests/test_live_matlab_parity.py'
- 'tests/test_imported_spectrum_seeded.py'
- 'tests/test_core_hydro_preprocess_parity.py'
- 'tests/fixtures/matlab/imported_spectrum_two_column/**'
- 'wecsim/environment/waveClass.py'
- 'wecsim/environment/irregularWave.py'
- 'wecsim/hydrodynamics/bodyClass.py'
- 'wecsim/interface/configuration.py'
- 'wecsim/dynamics/case_inputs.py'
- 'wecsim/dynamics/subspace_case.py'
- 'wecsim/dynamics/caseDynamics.py'
- 'examples/data/sphere.h5'
- 'examples/data/rm3.h5'
- 'examples/data/oswec.h5'
workflow_dispatch:
jobs:
compare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
repository: WEC-Sim/WEC-Sim
ref: 0753b2e47f2457c078751dcfe5d251d1767b80ab
path: matlab-ref
filter: blob:none
sparse-checkout: |
source/objects
source/functions/BEMIO
examples/RM3/hydroData/rm3.h5
- uses: matlab-actions/setup-matlab@v3
with:
release: R2025b
- uses: matlab-actions/run-command@v3
with:
command: addpath('matlab-ref/source/objects'); addpath('matlab-ref/source/functions/BEMIO'); run('tests/matlab/regular_wave_reference.m')
- uses: matlab-actions/run-command@v3
with:
command: addpath('matlab-ref/source/objects'); addpath('matlab-ref/source/functions/BEMIO'); run('tests/matlab/imported_spectrum_two_column_reference.m')
- uses: matlab-actions/run-command@v3
with:
command: run('tests/matlab/core_hydro_preprocess_reference.m')
env:
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
- run: ls -l matlab-reference-output
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
- run: python -m pip install -r requirements.txt pytest
- run: python -m pytest -q tests/test_live_matlab_parity.py
env:
WEC_SIM_MATLAB_REFERENCE_DIR: matlab-reference-output
- run: python -m pytest -q tests/test_imported_spectrum_seeded.py
env:
WEC_SIM_MATLAB_REFERENCE_DIR: matlab-reference-output
- run: python -m pytest -q tests/test_core_hydro_preprocess_parity.py
env:
WEC_SIM_MATLAB_REFERENCE_DIR: matlab-reference-output
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
- uses: actions/upload-artifact@v4
if: always()
with:
name: matlab-wave-reference
path: |
matlab-reference-output/*.csv
matlab-reference-output/matlab_release.txt
- uses: actions/upload-artifact@v4
if: always()
with:
name: matlab-core-hydro-preprocess
path: matlab-reference-output/core_hydro_*.mat