Skip to content

Commit

Permalink
Add automatic MEX compilation entry
Browse files Browse the repository at this point in the history
  • Loading branch information
korbinian90 authored and pzeidman committed Oct 29, 2024
1 parent 2b061f2 commit 1db5105
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/development/compilation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ Platform-specific throubleshooting is available with the links above. We list he
!!! failure "`bad image handle dimensions` error"

The error "`bad image handle dimensions`" when trying to display an image is an indication that the MEX files are not compatible with your platform and should be recompiled.

## Automatic recompilation on GitHub Actions

!!! info "How is the recompilation triggered?"

If new c files or changes are pushed to main, the [compile MEX](https://github.com/spm/spm/actions/workflows/compile_mex.yml) action will automatically run and recompile all MEX files. In can also be triggered manually, which works for a any branch.

The compiled MEX files will be available as zip a file under the [compile MEX](https://github.com/spm/spm/actions/workflows/compile_mex.yml) action by selecting the corresponding run of the action and downloading the spm-mex-all.zip file. It contains compiled MEX files for Windows, Linux, MacOS (Intel) and MacOS (Apple Silicon).

The suggested steps after changing or adding new c code is:
1. Confirm that the [automatic tests](https://github.com/spm/spm/actions/workflows/matlab.yml) still succeed
2. Download the [automatically compiled MEX files](https://github.com/spm/spm/actions/workflows/compile_mex.yml)
3. Manually add the MEX files of the corresponding change to the SPM repository (.mexa64, .mexmaca64, .mexmaci64, .mexw64)

Note: Currently, the action doesn't compile the external c dependencies. This is because of a problem of compiling the fieldtrip dependency on windows.

0 comments on commit 1db5105

Please sign in to comment.