From 1db5105fb52c1baf7c481d09ad52c9822c5cfc5b Mon Sep 17 00:00:00 2001 From: Korbinian Eckstein Date: Tue, 30 Jul 2024 15:39:17 +0200 Subject: [PATCH] Add automatic MEX compilation entry --- docs/development/compilation/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/development/compilation/index.md b/docs/development/compilation/index.md index 391cb7c..dd817ea 100644 --- a/docs/development/compilation/index.md +++ b/docs/development/compilation/index.md @@ -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.