Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic MEX compilation entry #5

Merged
merged 1 commit into from
Oct 29, 2024
Merged
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
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.
Loading