MATLAB matrix build #33042
This file contains hidden or 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
# This workflow runs a matrix build with both versions of setup MATLAB action | |
name: MATLAB matrix build | |
# Controls when the action will run. | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
release: [R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a, R2024b, latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
MATLAB_LOG_DIR: ${{ github.workspace }}/logs | |
MW_DIAGNOSTIC_DEST: file | |
MW_DIAGNOSTIC_SPEC: cppmicroservices::framework.*=all;install.*=all; | |
MW_VERBOSE_HTTPCLIENT_CORE: 1 | |
MW_BATCH_LICENSING_ONLINE: true # testing online validation, can remove when this becomes the default | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: ${{ matrix.release }} | |
products: Optimization_Toolbox Curve_Fitting_Toolbox | |
- name: Run tests and generate artifacts | |
uses: matlab-actions/run-tests@v2 | |
with: | |
source-folder: code | |
- name: Upload MPM and MATLAB logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: matlab-logs-${{ github.job }}-${{ matrix.os }} | |
path: ${{ env.MATLAB_LOG_DIR }} | |
if-no-files-found: ignore | |
- name: Send mail | |
if: ${{ failure() }} | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
username: ${{ secrets.MAIL_USERNAME }} | |
password: ${{ secrets.MAIL_PASSWORD }} | |
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }} | |
to: ${{ secrets.CI_INTERNAL_EMAIL }} | |
from: ${{ secrets.MAIL_USERNAME }} | |
secure: true | |
body: ${{ github.job }} job in workflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} |