1- name : CI - Linux/OSX/Windows - Conda
1+ name : CI - Conda
22
33on :
44 workflow_dispatch :
77
88jobs :
99 build-with-conda-and-test :
10- name : " [conda: ${{ matrix.os }}:py${{ matrix.python_version }}: ${{ matrix.qp_solver }}]"
10+ name : " ${{ matrix.os }} with SOFA master from Conda devel [QPSolver = ${{ matrix.qp_solver }}]"
1111 runs-on : ${{ matrix.os }}
1212 strategy :
1313 fail-fast : false
1414 matrix :
15- os : [ubuntu-22.04 , macos-13, macos-14, windows-2022 ]
16- python_version : ["3.13 "]
15+ os : [ubuntu-latest , macos-latest, windows-latest, ubuntu-24.04-arm ]
16+ python_version : ["3.12 "]
1717 build_type : ["Release"]
1818 qp_solver : ["qpOases", "proxQP"]
1919
@@ -28,68 +28,93 @@ jobs:
2828 channels : conda-forge
2929 conda-remove-defaults : " true"
3030
31- - name : Checkout source code
32- uses : actions/checkout@v4
33-
34- - name : Install SOFA from nightly packages [Conda]
31+ - name : Install SOFA and SofaPython3 from devel packages
3532 shell : bash -l {0}
3633 run : |
37- conda install sofa-devel sofa-python3 sofa-stlib sofa-softrobots -c sofa-framework-nightly
34+ conda install sofa-devel sofa-python3 -c https://prefix.dev/ sofa-framework-devel
3835
39- - name : Install compilation environment [Conda / Linux]
40- if : contains(matrix.os, 'ubuntu')
36+ - name : Install compilation environment
4137 shell : bash -l {0}
4238 run : |
43- conda install cmake compilers make ninja
44- conda install mesa-libgl-devel-cos7-x86_64
39+ conda install cmake cxx-compiler ninja pkg-config pybind11 cxxopts
4540
46- - name : Install compilation environment [Conda / macOS]
47- if : contains(matrix.os, 'macos')
41+ - name : Checkout SOFA SoftRobots
42+ uses : actions/checkout@v4
43+ with :
44+ repository : SofaDefrost/SoftRobots
45+ ref : master
46+ path : SoftRobots
47+
48+ - name : Configure SoftRobots [Linux / macOS]
49+ if : contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
4850 shell : bash -l {0}
4951 run : |
50- conda install cmake compilers make ninja
52+ cd SoftRobots
53+ mkdir build
54+ cd build
55+ cmake .. -GNinja \
56+ -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
57+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
58+ -DPython_EXECUTABLE:PATH=${CONDA_PREFIX}/bin/python \
59+ -DSOFTROBOTS_BUILD_TESTS:BOOL=OFF
5160
52- - name : Install compilation environment [Conda / Windows]
61+ - name : Configure SoftRobots [ Windows]
5362 if : contains(matrix.os, 'windows')
63+ # It's better to use CMD to have all VS variables setup
64+ shell : cmd /C CALL {0}
65+ run : |
66+ cd SoftRobots
67+ mkdir build
68+ cd build
69+ cmake .. -GNinja ^
70+ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%/Library ^
71+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
72+ -DPython_EXECUTABLE:PATH=%CONDA_PREFIX%/python.exe ^
73+ -DSOFTROBOTS_BUILD_TESTS:BOOL=OFF
74+
75+ - name : Build & install SoftRobots [Linux / macOS]
76+ if : contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
5477 shell : bash -l {0}
5578 run : |
56- conda install cmake vs2022_win-64
79+ cd SoftRobots/build
80+ cmake --build . --config ${{ matrix.build_type }} -v -j 2
81+ cmake --install . --config ${{ matrix.build_type }}
5782
58- - name : Install dependencies [Conda]
59- shell : bash -l {0}
83+ - name : Build & install SoftRobots [Windows]
84+ if : contains(matrix.os, 'windows')
85+ # It's better to use CMD to have all VS variables setup
86+ shell : cmd /C CALL {0}
6087 run : |
61- conda install eigen libboost-headers pybind11 cxxopts
88+ cd SoftRobots/build
89+ cmake --build . --config ${{ matrix.build_type }} -v -j 2
90+ cmake --install . --config ${{ matrix.build_type }}
6291
63- - name : Install QP solver dependencies [Conda / proxQP]
92+ - name : Checkout source code
93+ uses : actions/checkout@v4
94+
95+ - name : Install QP solver dependencies [proxQP]
6496 if : contains(matrix.qp_solver, 'proxQP')
6597 shell : bash -l {0}
6698 run : |
6799 conda install proxsuite
68100 echo "CMAKE_OPTS_QPSOLVER=-DSOFTROBOTSINVERSE_ENABLE_PROXQP=ON -DSOFTROBOTSINVERSE_ENABLE_QPOASES=OFF" >> "$GITHUB_ENV"
69101
70- - name : Install QP solver dependencies [Conda / qpOases & not osx-arm64 ]
71- if : contains(matrix.qp_solver, 'qpOases') && !contains(matrix.os, 'macos-14')
102+ - name : Install QP solver dependencies [qpOases]
103+ if : contains(matrix.qp_solver, 'qpOases')
72104 shell : bash -l {0}
73105 run : |
74106 conda install qpoases
75107 echo "CMAKE_OPTS_QPSOLVER=-DSOFTROBOTSINVERSE_ENABLE_PROXQP=OFF -DSOFTROBOTSINVERSE_ENABLE_QPOASES=ON" >> "$GITHUB_ENV"
76108
77- # Use embedded qpOases version as its conda package for python>3.10 under osx-arm64 platform is not supported anymore
78- - name : Install QP solver dependencies [Conda / qpOases & osx-arm64]
79- if : contains(matrix.qp_solver, 'qpOases') && contains(matrix.os, 'macos-14')
80- shell : bash -l {0}
81- run : |
82- echo "CMAKE_OPTS_QPSOLVER=-DSOFTROBOTSINVERSE_ENABLE_PROXQP=OFF -DSOFTROBOTSINVERSE_ENABLE_QPOASES=ON" >> "$GITHUB_ENV"
83-
84- - name : Print environment [Conda]
109+ - name : Print environment
85110 shell : bash -l {0}
86111 run : |
87112 conda info
88113 conda list
89114 env
90115
91- - name : Configure [Conda / Linux & macOS]
92- if : contains(matrix.os, 'macos ') || contains(matrix.os, 'ubuntu ')
116+ - name : Configure SoftRobots.Inverse [ Linux / macOS]
117+ if : contains(matrix.os, 'ubuntu ') || contains(matrix.os, 'macos ')
93118 shell : bash -l {0}
94119 run : |
95120 mkdir build
@@ -100,32 +125,37 @@ jobs:
100125 -DPython_EXECUTABLE:PATH=${CONDA_PREFIX}/bin/python \
101126 -DSOFTROBOTSINVERSE_BUILD_TESTS:BOOL=ON
102127
103- - name : Configure [Conda / Windows]
128+ - name : Configure SoftRobots.Inverse [ Windows]
104129 if : contains(matrix.os, 'windows')
105- shell : bash -l {0}
130+ # It's better to use CMD to have all VS variables setup
131+ shell : cmd /C CALL {0}
106132 run : |
107133 mkdir build
108134 cd build
109- cmake .. -G"Visual Studio 17 2022" -T "v143" $CMAKE_OPTS_QPSOLVER \
110- -DCMAKE_GENERATOR_PLATFORM=x64 \
111- -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
112- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
113- -DPython_EXECUTABLE:PATH=${CONDA_PREFIX}/python.exe \
135+ cmake .. -GNinja %CMAKE_OPTS_QPSOLVER% ^
136+ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^
137+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
138+ -DPython_EXECUTABLE:PATH=%CONDA_PREFIX%/python.exe ^
114139 -DSOFTROBOTSINVERSE_BUILD_TESTS:BOOL=ON
115140
116- - name : Build [Conda]
141+ - name : Build && install SoftRobots.Inverse [Linux / macOS]
142+ if : contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
117143 shell : bash -l {0}
118144 run : |
119145 cd build
120146 cmake --build . --config ${{ matrix.build_type }} -v -j 2
147+ cmake --install . --config ${{ matrix.build_type }}
121148
122- - name : Install [Conda]
123- shell : bash -l {0}
149+ - name : Build && install SoftRobots.Inverse [Windows]
150+ if : contains(matrix.os, 'windows')
151+ # It's better to use CMD to have all VS variables setup
152+ shell : cmd /C CALL {0}
124153 run : |
125154 cd build
155+ cmake --build . --config ${{ matrix.build_type }} -v -j 2
126156 cmake --install . --config ${{ matrix.build_type }}
127157
128- - name : Test [Conda]
158+ - name : Test SoftRobots.Inverse
129159 shell : bash -l {0}
130160 run : |
131161 cd build
0 commit comments