Skip to content

WEC-Sim+MOST Application #212

WEC-Sim+MOST Application

WEC-Sim+MOST Application #212

Workflow file for this run

name: Run MATLAB tests on dev branch
on:
# Trigger the workflow on push or pull requests on the dev branch and on
# pushes to WEC-Sim/WEC-Sim dev branch
push:
branches:
- dev
pull_request:
branches:
- dev
repository_dispatch:
types:
- wecsim-dev
jobs:
dispatch_event:
runs-on: ubuntu-latest
name: Identify dispatch event
if: github.event_name == 'repository_dispatch'
steps:
- run: echo "Triggered by WEC-Sim commit ${{ github.event.client_payload.sha }}"
run_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
release: [R2020b, latest]
folder: [Body-to-Body_Interactions,
Cable,
Controls,
End_Stops,
Free_Decay,
Generalized_Body_Modes,
Mooring,
Morison_Element,
Multiple_Condition_Runs,
Nonhydro_Body,
Nonlinear_Hydro,
Paraview_Visualization,
Passive_Yaw,
PTO-Sim,
Wave_Markers,
WECCCOMP,
Write_Custom_h5]
name: ${{ matrix.folder }} on MATLAB ${{ matrix.release }}
steps:
- name: Check out repository (repository dispatch)
uses: actions/checkout@v2
with:
lfs: true
ref: 'dev'
if: github.event_name == 'repository_dispatch'
- name: Check out repository (push or pull request)
uses: actions/checkout@v2
with:
lfs: true
if: github.event_name != 'repository_dispatch'
- name: Checkout LFS objects
run: git lfs checkout
- name: Check out WEC-Sim
uses: actions/checkout@v2
with:
repository: WEC-Sim/WEC-Sim
ref: 'dev'
path: './WEC-Sim'
- name: Check out MoorDyn
uses: actions/checkout@v2
with:
repository: WEC-Sim/MoorDyn
path: './MoorDyn'
- name: Copy MoorDyn Files
run: |
cp * ../WEC-Sim/source/functions/moorDyn
ls ../WEC-Sim/source/functions/moorDyn
shell: bash
working-directory: './MoorDyn'
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
- name: Install WEC-Sim
uses: matlab-actions/run-command@v1
with:
command: addpath(genpath('WEC-Sim/source'));, savepath pathdef.m;
- name: Run tests and generate artifacts
uses: matlab-actions/run-command@v1
with:
command: results = wecSimAppTest("${{ matrix.folder }}"), assertSuccess(results);