Skip to content

Updates for v6.0 Release (#1143) #2

Updates for v6.0 Release (#1143)

Updates for v6.0 Release (#1143) #2

name: Run MATLAB tests on master branch
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
workflow_dispatch: {}
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run_windows_tests:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
release: [R2020b, R2021a, R2021b, R2022a, R2022b, R2023a]
name: MATLAB ${{ matrix.release }} on Windows
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
lfs: true
- name: Check out LFS objects
run: git lfs checkout
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2-beta
with:
release: ${{ matrix.release }}
products: Simulink Simscape Simscape_Multibody
- name: Install WEC-Sim
uses: matlab-actions/run-command@v1
with:
command: |
addpath(genpath('source')),
savepath pathdef.m;
- name: Run tests and generate artifacts
uses: matlab-actions/run-command@v1
with:
command: |
set_param(0, 'ErrorIfLoadNewModel', 'off'),
results = wecSimTest,
assertSuccess(results);
startup-options: -noFigureWindows
run_linux_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
release: [R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, latest]
name: MATLAB ${{ matrix.release }} on Linux
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
lfs: true
- name: Check out LFS objects
run: git lfs checkout
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2-beta
with:
release: ${{ matrix.release }}
products: Simulink Simscape Simscape_Multibody
- name: Install WEC-Sim
uses: matlab-actions/run-command@v1
with:
command: |
addpath(genpath('source')),
savepath pathdef.m;
- name: Run tests and generate artifacts
uses: matlab-actions/run-command@v1
with:
command: |
set_param(0, 'ErrorIfLoadNewModel', 'off'),
results = wecSimTest,
assertSuccess(results);
startup-options: -noFigureWindows