Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 1 addition & 113 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,19 +385,6 @@ jobs:
run: |
make -C build install

- name: Create MATLAB Toolbox Package
if: startsWith(github.ref, 'refs/tags/')
run: |
# The toolbox is created during installation if AL_CREATE_TOOLBOX is ON (default)
# Verify the toolbox file was created
echo "Looking for MATLAB toolbox file in build directory:"
find build -name "*.mltbx" -type f

# Create a known location for the artifact
mkdir -p artifacts
cp build/*.mltbx artifacts/ || echo "Warning: No toolbox file found"
ls -lh artifacts/

- name: List installed files
run: |
ls -lR install/
Expand All @@ -421,15 +408,6 @@ jobs:
name: installation-${{ matrix.name }}
path: install/
retention-days: 7

- name: Upload MATLAB Toolbox
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: matlab-toolbox-${{ matrix.name }}
path: artifacts/*.mltbx
retention-days: 90
if-no-files-found: warn

build-docs-only:
name: Build Documentation Only
Expand Down Expand Up @@ -526,95 +504,5 @@ jobs:
compression-level: 6
overwrite: false
include-hidden-files: false

- name: Deploy to GitHub Pages
if: success() && github.ref == 'refs/heads/develop'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/_build/html
destination_dir: docs
commit_message: 'docs: update documentation from ${{ github.sha }}'

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-linux]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download MATLAB Toolbox artifacts
uses: actions/download-artifact@v4
with:
pattern: matlab-toolbox-*
path: release-artifacts
merge-multiple: true

- name: List downloaded artifacts
run: |
echo "Downloaded artifacts:"
ls -lR release-artifacts/

- name: Extract version from tag
id: version
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "version=${TAG_NAME#v}" >> $GITHUB_OUTPUT

- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.version.outputs.tag }}
draft: false
prerelease: false
generate_release_notes: true
files: |
release-artifacts/*.mltbx
body: |
## IMAS-MATLAB Release ${{ steps.version.outputs.version }}

This release includes the MATLAB toolbox package for IMAS Access Layer.

### Available Platform

- **Linux (linux64)**: Ubuntu 24.04 and compatible systems

### Installation

1. Download the `.mltbx` file:
- `IMAS-MATLAB_*-linux64.mltbx` for Linux

2. Install in MATLAB by double-clicking the file, or use:
```matlab
matlab.addons.toolbox.installToolbox('IMAS-MATLAB_<version>-linux64.mltbx')
```

### Usage

After installation, the toolbox will be automatically added to your MATLAB path. You can start using it with:
```matlab
% Open IMAS database using URI
uri = 'imas:hdf5?path=./my_database';
pulse = imas_open(uri, 'w');

% Create and put IDS
magnetics = ids_gen('magnetics');
ids_put(pulse, magnetics);

% Close database
imas_close(pulse);
```

### What's Changed

See the full changelog below.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# build-release job removed - toolbox creation is disabled
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/create_matlab_toolbox.m
DESTINATION . )

# Option to create MATLAB toolbox package during installation
option(AL_CREATE_TOOLBOX "Automatically create MATLAB toolbox package during installation" ON)
option(AL_CREATE_TOOLBOX "Automatically create MATLAB toolbox package during installation" OFF)

# Get MATLAB executable path
if(DEFINED Matlab_MAIN_PROGRAM)
Expand Down
27 changes: 27 additions & 0 deletions doc/doc_common/building_installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,33 @@ Configuration options
For a complete list of available configuration options, please see the `IMAS Core Configuration Options <https://imas-core.readthedocs.io/en/latest/user_guide/installation.html#configuration-options>`__.


MATLAB-specific configuration options
'''''''''''''''''''''''''''''''''''''

The following options are specific to the MATLAB High Level Interface:

- ``AL_CREATE_TOOLBOX``: Automatically create MATLAB toolbox package (``.mltbx``) during installation

- **Default:** ``OFF``
- **Type:** Boolean
- **Description:** If set to ``ON``, the MATLAB toolbox package will be created automatically when you run
``cmake --install``. This requires MATLAB to be installed and available in your PATH. If disabled, you can
create the toolbox manually at any time using the ``matlab-toolbox`` build target.

- **Usage Examples:**

- Enable during configuration::

cmake -B build -DAL_CREATE_TOOLBOX=ON ...
cmake --install build

- Create toolbox after installation (default)::

cmake -B build ...
cmake --install build
cmake --build build --target matlab-toolbox


Build the High Level Interface
``````````````````````````````

Expand Down
Loading