Skip to content

Commit

Permalink
Updated github actions according to what was done in ezc3d
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Aug 14, 2024
1 parent 04c8c39 commit 03993c4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run_casadi_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/run_eigen_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
21 changes: 10 additions & 11 deletions binding/matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
)

0 comments on commit 03993c4

Please sign in to comment.