Skip to content

Commit

Permalink
Use separate GitHub Actions workflow files (.github/workflows/*.yml) …
Browse files Browse the repository at this point in the history
…for Linux, Windows, and MacOS.
  • Loading branch information
isaacito12 committed Jan 30, 2025
1 parent 628a552 commit 00436b5
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 17 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml → .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Copyright 2021-2025 The MathWorks, Inc.

name: CI using MATLAB
name: CI using MATLAB on Linux

on:
push:
Expand Down Expand Up @@ -43,14 +43,18 @@ jobs:

job-buildtool:

name: Test in ${{ matrix.matlab_version }}

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

# Matrix strategy is used to run the job in various MATLAB versions.
# For information about matrix strategy, see the documentation.
# - Running variations of jobs in a workflow
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow
strategy:
matrix:
os: [ubuntu-latest]
matlab_version: [R2024b]
#matlab_version: [R2024b, R2025a]

name: Test in ${{ matrix.matlab_version }} on Linux

permissions:
# required for sarif upload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Copyright 2025 The MathWorks, Inc.

name: CI using MATLAB
name: CI using MATLAB on MacOS

on:
push:
Expand Down Expand Up @@ -40,14 +40,14 @@ jobs:

job-buildtool:

name: Test in ${{ matrix.matlab_version }}

runs-on: ${{ matrix.os }}
runs-on: macos-latest

strategy:
matrix:
os: [windows-latest, macos-latest]
matlab_version: [R2024b]
#matlab_version: [R2024b, R2025a]

name: Test in ${{ matrix.matlab_version }} on macOS

steps:

Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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 2025 The MathWorks, Inc.

name: CI using MATLAB on Windows

on:
push:
branches: [ R2024b ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.png'
- '**.svg'
- '**.txt'
- '**.xml'

pull_request:
branches: [ R2024b ]
paths-ignore:
- 'docs/**'
- '**.md'
- '**.png'
- '**.svg'
- '**.txt'
- '**.xml'

workflow_dispatch:

jobs:

job-buildtool:

runs-on: windows-latest

strategy:
matrix:
matlab_version: [R2024b]
#matlab_version: [R2024b, R2025a]

name: Test in ${{ matrix.matlab_version }} on Windows

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 }}
cache: true
products: |
Simulink
Simscape
Simscape_Electrical
Simscape_Driveline
Powertrain_Blockset
- name: Run buildtool using buildfile.m
uses: matlab-actions/run-command@v2
with:
command: |
openProject(pwd);
buildtool CodeIssues CheckProject Test
2 changes: 1 addition & 1 deletion cache/dependencycache.graphml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<data key="key23">false</data>
<data key="key24">false</data>
<data key="key25">C:/local/mw/gh-isaacito12-bev</data>
<data key="key26">2025-01-30T11:22:17.656303</data>
<data key="key26">2025-01-30T13:01:41.460696</data>
<node id="n0">
<data key="key1">BT;PS</data>
<data key="key28"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info location="ci-linux.yml" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info location="ci-mac.yml" type="File"/>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info location="ci-windows.yml" type="File"/>

This file was deleted.

0 comments on commit 00436b5

Please sign in to comment.