Fix moordyn initial displacement #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
folder: [Mooring] | |
release: [R2023b] | |
include: | |
- products: Simulink Simscape Simscape_Multibody | |
name: "${{ matrix.folder }} - ${{ matrix.os }} - ${{ matrix.release }}" | |
timeout-minutes: 45 | |
steps: | |
- name: Check out repository (repository dispatch) | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
ref: 'dev' | |
if: github.event_name == 'repository_dispatch' | |
- name: Check out repository (push or pull request) | |
uses: actions/checkout@v4 | |
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@v4 | |
with: | |
repository: WEC-Sim/WEC-Sim | |
ref: 'dev' | |
path: './WEC-Sim' | |
- name: Check out MoorDyn | |
if: matrix.folder == 'Mooring' | |
uses: actions/checkout@v4 | |
with: | |
repository: jtgrasb/MoorDyn | |
path: './MoorDyn' | |
- name: Copy MoorDyn Files | |
if: matrix.folder == 'Mooring' | |
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@v2 | |
with: | |
products: ${{ matrix.products }} | |
release: ${{ matrix.release }} | |
- name: Start display server (Desalination on Linux) | |
if: matrix.folder == 'Desalination' && matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install xvfb | |
Xvfb :99 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Install WEC-Sim, run tests and generate artifacts | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: | | |
addpath(genpath('WEC-Sim/source')); | |
results = wecSimAppTest("${{ matrix.folder }}"), | |
assertSuccess(results); |