Skip to content

Renamed changelog.md to Changelog.md #9

Renamed changelog.md to Changelog.md

Renamed changelog.md to Changelog.md #9

Workflow file for this run

name: Test Framework Extensions CI
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
env:
DOCMAKER_GITHUB_TOKEN: ${{ secrets.DOCMAKER_GITHUB_TOKEN }}
jobs:
run-tests:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
matlab-version: [R2023b, R2024b, R2025b, R2026a]
runs-on: ${{ matrix.platform }}
continue-on-error: false
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Start a display server for jobs running on Linux
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Set up MATLAB on the runner
uses: matlab-actions/setup-matlab@v2
with:
products: |
MATLAB
Simulink
Parallel_Computing_Toolbox
release: ${{ matrix.matlab-version }}
- name: Run the toolbox tests
uses: matlab-actions/run-tests@v2
package-and-release-toolbox:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Extract version from tag
shell: bash
run: |
TOOLBOX_VERSION="${GITHUB_REF_NAME#v}"
echo "TOOLBOX_VERSION=$TOOLBOX_VERSION" >> $GITHUB_ENV
- name: Set up MATLAB on the runner
uses: matlab-actions/setup-matlab@v2
with:
products: MATLAB
release: R2026a
- name: Package toolbox
uses: matlab-actions/run-command@v2
with:
command: |
% Download and install DocMaker
toolboxFile = websave( "MATLAB_DocMaker.mltbx", "https://github.com/mathworks/docmaker/releases/latest/download/MATLAB_DocMaker.mltbx" );
fileCleanup = onCleanup( @() delete( toolboxFile ) );
matlab.addons.install( toolboxFile, true );
% Extract the latest release notes
logLines = readlines( "tbx/testextdoc/Changelog.md" );
startIdx = find( logLines == "## Version " + getenv( "TOOLBOX_VERSION" ) );
allVersionLines = find( startsWith( logLines, "##" ) );
endIdx = allVersionLines(find( allVersionLines > startIdx, 1 )) - 1;
releaseNotes = join( logLines(startIdx:endIdx), newline() );
systemCommand = sprintf( [ ...
'echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV && ', ...
'echo "%s" >> $GITHUB_ENV && ', ...
'echo "EOF" >> $GITHUB_ENV'], releaseNotes );
system( systemCommand );
% Package the toolbox
buildtool package -skip test -skip check
- name: Release toolbox
uses: softprops/action-gh-release@v3
with:
name: Test Framework Extensions ${{ env.TOOLBOX_VERSION }}
tag_name: v${{ env.TOOLBOX_VERSION }}
body: ${{ env.RELEASE_NOTES }}
draft: false
make_latest: true
files: releases/TestFrameworkExtensions.mltbx