-
Notifications
You must be signed in to change notification settings - Fork 9
110 lines (95 loc) · 3.16 KB
/
ci-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI - Linux/OSX/Windows - Conda
on:
workflow_dispatch:
push:
pull_request:
jobs:
build-with-conda-and-test:
name: "[conda:${{ matrix.os }}:py${{ matrix.python_version }}]"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
python_version: ["3.13"]
build_type: ["Release"]
steps:
- name: Install miniconda [Linux & macOS & Windows]
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: sofa
auto-update-conda: true
miniforge-version: latest
python-version: ${{ matrix.python_version }}
channels: conda-forge
conda-remove-defaults: "true"
- name: Checkout source code
uses: actions/checkout@v4
- name: Install SOFA from nightly packages [Conda]
shell: bash -l {0}
run: |
conda install sofa-devel sofa-python3 sofa-stlib sofa-softrobots -c sofa-framework-nightly
- name: Install compilation environment [Conda / Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
conda install cmake compilers make ninja
conda install mesa-libgl-devel-cos7-x86_64
- name: Install compilation environment [Conda / macOS]
if: contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
conda install cmake compilers make ninja
- name: Install compilation environment [Conda / Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
conda install cmake vs2022_win-64
- name: Install dependencies [Conda]
shell: bash -l {0}
run: |
conda install eigen libboost-headers pybind11 cxxopts
- name: Print environment [Conda]
shell: bash -l {0}
run: |
conda info
conda list
env
- name: Configure [Conda / Linux & macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir build
cd build
cmake .. -GNinja \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DPython_EXECUTABLE:PATH=${CONDA_PREFIX}/bin/python \
-DSOFTROBOTSINVERSE_BUILD_TESTS:BOOL=ON
- name: Configure [Conda / Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
mkdir build
cd build
cmake .. -G"Visual Studio 17 2022" -T "v143" \
-DCMAKE_GENERATOR_PLATFORM=x64 \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DPython_EXECUTABLE:PATH=${CONDA_PREFIX}/python.exe \
-DSOFTROBOTSINVERSE_BUILD_TESTS:BOOL=ON
- name: Build [Conda]
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} -v -j 2
- name: Install [Conda]
shell: bash -l {0}
run: |
cd build
cmake --install . --config ${{ matrix.build_type }}
- name: Test [Conda]
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}