diff --git a/.github/workflows/push_matlab_eigen_binaries.yml b/.github/workflows/publish_matlab_eigen_binaries.yml similarity index 89% rename from .github/workflows/push_matlab_eigen_binaries.yml rename to .github/workflows/publish_matlab_eigen_binaries.yml index 236b8700..97c2f8b5 100644 --- a/.github/workflows/push_matlab_eigen_binaries.yml +++ b/.github/workflows/publish_matlab_eigen_binaries.yml @@ -12,14 +12,14 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, macos-13-arm64, macos-13, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] include: - os: ubuntu-latest label: linux-64 prefix: /usr/share/miniconda3/envs/biorbd_eigen - - os: macos-13-arm64 - label: osx-arm64 - prefix: /Users/runner/miniconda3/envs/biorbd_eigen + # - os: macos-latest + # label: osx-arm64 + # prefix: /Users/runner/miniconda3/envs/biorbd_eigen - os: macos-13 label: osx-intel prefix: /Users/runner/miniconda3/envs/biorbd_eigen @@ -67,13 +67,14 @@ jobs: - name: Install MATLAB on WINDOWS, LINUX and MACOS-Intel uses: matlab-actions/setup-matlab@v2 - with: + with: cache: true if: matrix.label != 'osx-arm64' - - name: Install MATLAB on MACOS-arm64 + - name: Install MATLAB on MACOS-Arm64 uses: matlab-actions/setup-matlab@v2 with: + # The version of MATLAB of R2024a does not contain MX_LIBRARY release: R2023a cache: true if: matrix.label == 'osx-arm64' @@ -106,12 +107,12 @@ jobs: - name: Build MATLAB archives on UNIX run: | cp -r $HOME/biorbd_matlab . - zip -r biorbd_matlab_${{ matrix.label }}.zip biorbd_matlab + zip -r biorbd_eigen_matlab_${{ matrix.label }}.zip biorbd_eigen_matlab if: matrix.label != 'win-64' - name: Build MATLAB archives on WINDOWS run: | - 7z a biorbd_matlab_${{ matrix.label }}.zip $HOME/biorbd_matlab + 7z a biorbd_eigen_matlab_${{ matrix.label }}.zip $HOME/biorbd_eigen_matlab if: matrix.label == 'win-64' - name: Upload files to a GitHub release diff --git a/.github/workflows/run_casadi_tests.yml b/.github/workflows/run_casadi_tests.yml index 233075c0..f9913c01 100644 --- a/.github/workflows/run_casadi_tests.yml +++ b/.github/workflows/run_casadi_tests.yml @@ -10,14 +10,14 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, macos-14-arm64, macos-13, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] include: - os: ubuntu-latest label: linux-64 prefix: /usr/share/miniconda3/envs/biorbd_casadi - - os: macos-14-arm64 - label: osx-arm64 - prefix: /Users/runner/miniconda3/envs/biorbd_casadi + # - os: macos-latest + # label: osx-arm64 + # prefix: /Users/runner/miniconda3/envs/biorbd_casadi - os: macos-13 label: osx-intel prefix: /Users/runner/miniconda3/envs/biorbd_casadi diff --git a/.github/workflows/run_eigen_tests.yml b/.github/workflows/run_eigen_tests.yml index e849ca4a..d1b7950f 100644 --- a/.github/workflows/run_eigen_tests.yml +++ b/.github/workflows/run_eigen_tests.yml @@ -10,14 +10,14 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, macos-14-arm64, macos-13, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] include: - os: ubuntu-latest label: linux-64 prefix: /usr/share/miniconda3/envs/biorbd_eigen - - os: macos-14-arm64 - label: osx-arm64 - prefix: /Users/runner/miniconda3/envs/biorbd_eigen + # - os: macos-latest + # label: osx-arm64 + # prefix: /Users/runner/miniconda3/envs/biorbd_eigen - os: macos-13 label: osx-intel prefix: /Users/runner/miniconda3/envs/biorbd_eigen @@ -69,9 +69,10 @@ jobs: cache: true if: matrix.label != 'osx-arm64' - - name: Install MATLAB on MACOS-arm64 + - name: Install MATLAB on MACOS-Arm64 uses: matlab-actions/setup-matlab@v2 with: + # The version of MATLAB of R2024a does not contain MX_LIBRARY release: R2023a cache: true if: matrix.label == 'osx-arm64' diff --git a/binding/matlab/CMakeLists.txt b/binding/matlab/CMakeLists.txt index 92bbcd6d..d6562ce6 100644 --- a/binding/matlab/CMakeLists.txt +++ b/binding/matlab/CMakeLists.txt @@ -3,6 +3,11 @@ cmake_minimum_required(VERSION 3.8) find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY) +# Installation path +set(Matlab_${BIORBD_NAME}_INSTALL_DIR "${Matlab_ROOT_DIR}/toolbox" CACHE PATH + "Toolbox path to install, please note that the default directory may + require administrator access" +) # Get the file to compile set(CPP_FILES @@ -50,20 +55,19 @@ foreach(CPP_FILE ${CPP_FILES}) ) endif(CMAKE_CL_64) elseif(APPLE) - if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set_target_properties(${PROJECT_NAME}_${SUFFIXES} PROPERTIES + if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".mexmaci64" PREFIX "" ) - elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") - set_target_properties(${PROJECT_NAME}_${SUFFIXES} PROPERTIES + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") + set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".mexmaca64" PREFIX "" ) else() - message(FATAL_ERROR "Unknown architecture: ${CMAKE_SYSTEM_PROCESSOR}") + message(FATAL_ERROR "Unknown architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}") endif () - else() if (CMAKE_SIZEOF_VOID_P MATCHES "8") set_target_properties(${PROJECT_NAME} PROPERTIES @@ -96,8 +100,3 @@ foreach(CPP_FILE ${CPP_FILES}) DESTINATION "${Matlab_${BIORBD_NAME}_INSTALL_DIR}/${PROJECT_NAME}") endforeach(CPP_FILE) -# Installation path -set(Matlab_${BIORBD_NAME}_INSTALL_DIR "${Matlab_ROOT_DIR}/toolbox" CACHE PATH - "Toolbox path to install, please note that the default directory may - require administrator access" -)