Skip to content

feat: update ci.yml to test across os and MATLAB versions #11

feat: update ci.yml to test across os and MATLAB versions

feat: update ci.yml to test across os and MATLAB versions #11

Workflow file for this run

# GitHub Actions Workflow with MATLAB Actions
#
# For a general overview of GitHub Actions, see
# https://docs.github.com/en/actions
#
# For using MathWorks products in GitHub Actions, see
# https://github.com/matlab-actions/overview
#
# For details about the syntax of this file, see
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# Copyright 2023-2025 The MathWorks, Inc.
name: CI using MATLAB Across Multiple OS and MATLAB Versions
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.png'
- '**.svg'
- '**.txt'
- '**.xml'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.png'
- '**.svg'
- '**.txt'
- '**.xml'
jobs:
check-project:
name: Check Project on ${{ matrix.os }} with MATLAB ${{ matrix.matlab_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
matlab_version: [R2021b, R2022b, R2023b, R2024b]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup MATLAB ${{ matrix.matlab_version }}
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.matlab_version }}
- name: Run Project Tests
uses: matlab-actions/run-command@v2
with:
command: |
openProject(pwd);
ImportMotorCADThermalModel_CheckProject_runtests;
run-libraries-tests:
name: Run Libraries Tests on ${{ matrix.os }} with MATLAB ${{ matrix.matlab_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
matlab_version: [R2021b, R2022b, R2023b, R2024b]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup MATLAB ${{ matrix.matlab_version }}
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.matlab_version }}
- name: Run Libraries Tests
uses: matlab-actions/run-command@v2
with:
command: |
openProject(pwd);
ImportMotorCADThermalModel_runlibtests;