MATLAB matrix build #24983
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
# 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-v1: | |
strategy: | |
matrix: | |
# Run this workflow on different os | |
os: [windows-2022, ubuntu-22.04, macos-12] | |
fail-fast: false | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v1 | |
# Runs a set of commands using the runners shell | |
- name: Run tests and generate artifacts | |
uses: matlab-actions/run-tests@v1 | |
with: | |
source-folder: code | |
- 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 }} | |
build-v2: | |
strategy: | |
matrix: | |
# Run this workflow on different os | |
os: [windows-2022, ubuntu-22.04, macos-12, macos-14] | |
fail-fast: false | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
# Runs a set of commands using the runners shell | |
- name: Run tests and generate artifacts | |
uses: matlab-actions/run-tests@v2 | |
with: | |
source-folder: code | |
- 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 }} | |
build-v2-with-cache: | |
strategy: | |
matrix: | |
# Run this workflow on different os | |
os: [ubuntu-22.04] # [windows-2022, ubuntu-22.04, macos-12] restore when Windows and Mac are working again (ETA mid-October 2023) | |
fail-fast: false | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
cache: true | |
# Runs a set of commands using the runners shell | |
- name: Run tests and generate artifacts | |
uses: matlab-actions/run-tests@v2 | |
with: | |
source-folder: code | |
- 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 }} |