@@ -4,63 +4,75 @@ on: [push,pull_request]
4
4
5
5
jobs :
6
6
hpp-fcl-conda :
7
- name : CI on ${{ matrix.os }} with Conda
7
+ name : CI on ${{ matrix.os }} with Conda Python ${{ matrix.python-version }} - ${{ matrix.build_type }} ${{ matrix.cxx_options }}
8
8
runs-on : ${{ matrix.os }}
9
+ env :
10
+ CCACHE_BASEDIR : " ${GITHUB_WORKSPACE}"
11
+ CCACHE_DIR : " ${GITHUB_WORKSPACE}/.ccache"
12
+ CCACHE_COMPRESS : true
13
+ CCACHE_COMPRESSLEVEL : 6
9
14
10
15
strategy :
11
16
fail-fast : false
12
17
matrix :
13
18
os : ["ubuntu-latest", "macos-latest"]
14
19
python-version : ["3.8", "3.12"]
20
+ cxx_options : ['', '-mavx2']
21
+ build_type : [Release, Debug]
22
+ exclude :
23
+ - build_type : Debug
24
+ cxx_options : -mavx2
25
+ os : macos-latest
26
+ - build_type : Release
27
+ cxx_options : -mavx2
28
+ os : macos-latest
15
29
16
30
steps :
17
- - uses : actions/checkout@v3
31
+ - uses : actions/checkout@v4
18
32
with :
19
33
submodules : recursive
20
34
21
- - uses : conda-incubator/setup-miniconda@v2
35
+ - uses : actions/cache@v3
22
36
with :
23
- activate-environment : hpp-fcl
37
+ path : .ccache
38
+ key : ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-${{ github.sha }}
39
+ restore-keys : ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-
40
+
41
+ - uses : conda-incubator/setup-miniconda@v3
42
+ with :
43
+ activate-environment : fcl
24
44
auto-update-conda : true
25
- environment-file : .github/workflows/conda/conda-env .yml
45
+ environment-file : .github/workflows/conda/environment_macos_linux .yml
26
46
python-version : ${{ matrix.python-version }}
27
-
28
- - name : Install compilers on OSX
29
- if : contains(matrix.os, 'macos')
30
- shell : bash -l {0}
31
- run : |
32
- conda activate hpp-fcl
33
- conda install compilers=1.4.2 -c conda-forge
34
-
35
- - name : Install cmake and update conda
36
- shell : bash -l {0}
37
- run : |
38
- conda activate hpp-fcl
39
- conda install cmake -c main
40
- conda install llvm-openmp -c conda-forge
47
+ auto-activate-base : false
41
48
42
49
- name : Build hpp-fcl
43
- shell : bash -l {0}
50
+ shell : bash -el {0}
44
51
run : |
45
- conda activate hpp-fcl
46
52
conda list
47
53
echo $CONDA_PREFIX
48
54
49
55
mkdir build
50
56
cd build
51
57
52
- cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3) -DGENERATE_PYTHON_STUBS=ON -DHPP_FCL_HAS_QHULL=ON
53
- make -j2
54
- make build_tests
55
- export CTEST_OUTPUT_ON_FAILURE=1
56
- make test
57
- make install
58
+ cmake .. \
59
+ -G "Ninja" \
60
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
61
+ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
62
+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
63
+ -DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }} \
64
+ -DPYTHON_EXECUTABLE=$(which python3) \
65
+ -DGENERATE_PYTHON_STUBS=ON \
66
+ -DHPP_FCL_HAS_QHULL=ON
67
+ cmake --build . -j2
68
+ ctest --output-on-failure
69
+ cmake --install .
58
70
59
71
- name : Uninstall hpp-fcl
60
- shell : bash -l {0}
72
+ shell : bash -el {0}
61
73
run : |
62
74
cd build
63
- make uninstall
75
+ cmake --build . --target uninstall
64
76
65
77
check :
66
78
if : always()
0 commit comments