77 name : ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }}
88 runs-on : ${{ matrix.os }}
99 env :
10- CCACHE_DIR : ${{ matrix.CCACHE_DIR }}
10+ CCACHE_BASEDIR : " ${GITHUB_WORKSPACE}"
11+ CCACHE_DIR : " ${GITHUB_WORKSPACE}/.ccache"
12+ CCACHE_COMPRESS : true
13+ CCACHE_COMPRESSLEVEL : 6
1114
1215 strategy :
1316 fail-fast : false
1720 build_type : [Release, Debug]
1821 python-version : ["3.8", "3.12"]
1922
20- include :
21- - os : ubuntu-latest
22- CCACHE_DIR : /home/runner/.ccache
23- - os : macos-latest
24- CCACHE_DIR : /Users/runner/.ccache
25-
2623 exclude :
2724 - build_type : Debug
2825 cxx_options : -mavx2
@@ -32,71 +29,72 @@ jobs:
3229 os : macos-latest
3330
3431 steps :
35- - uses : actions/checkout@v3
32+ - uses : actions/checkout@v4
3633 with :
3734 submodules : recursive
3835
39- - uses : conda-incubator/setup-miniconda@v2
36+ - uses : actions/cache@v3
37+ with :
38+ path : .ccache
39+ key : ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-${{ github.sha }}
40+ restore-keys : ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-
41+
42+ - uses : conda-incubator/setup-miniconda@v3
4043 with :
4144 activate-environment : eigenpy
4245 auto-update-conda : true
43- environment-file : .github/workflows/conda/environment .yml
46+ environment-file : .github/workflows/conda/environment_macos_linux .yml
4447 python-version : ${{ matrix.python-version }}
45-
46- - uses : actions/cache@v3
47- with :
48- path : ${{ env.CCACHE_DIR }}
49- key : ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}
50-
51- - name : Prepare cache dir
52- run : sudo mkdir -p ${CCACHE_DIR}/tmp && sudo chown -R $(id -un) ${CCACHE_DIR}
53-
54- - name : Install cmake and update conda
55- shell : bash -l {0}
56- run : |
57- conda activate eigenpy
58- conda install cmake ccache -c conda-forge
59- conda list
48+ auto-activate-base : false
6049
6150 - name : Build EigenPy
62- shell : bash -l {0}
51+ shell : bash -el {0}
6352 run : |
64- conda activate eigenpy
53+ conda list
6554 echo $CONDA_PREFIX
6655
6756 mkdir build
6857 cd build
6958
70- cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DPYTHON_EXECUTABLE=$(which python3) -DGENERATE_PYTHON_STUBS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }}
71- make
72- make build_tests
73- export CTEST_OUTPUT_ON_FAILURE=1
74- make test
75- make install
59+ cmake .. \
60+ -G "Ninja" \
61+ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
62+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
63+ -DPYTHON_EXECUTABLE=$(which python3) \
64+ -DGENERATE_PYTHON_STUBS=ON \
65+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
66+ -DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }}
67+ cmake --build . -j2
68+ ctest --output-on-failure
69+ cmake --install .
7670
7771 - name : Test packaging
78- shell : bash -l {0}
72+ shell : bash -el {0}
7973 run : |
80- conda activate eigenpy
81-
82- cmake -B test-packaging -S unittest/packaging/cmake -DPYTHON_EXECUTABLE=$(which python3)
74+ cmake -B test-packaging \
75+ -S unittest/packaging/cmake \
76+ -G "Ninja" \
77+ -DPYTHON_EXECUTABLE=$(which python3)
8378
8479 - name : Configure hpp-fcl
85- shell : bash -l {0}
80+ shell : bash -el {0}
8681 run : |
87- conda activate eigenpy
8882 conda install -c conda-forge octomap assimp qhull
8983
9084 git clone https://github.com/humanoid-path-planner/hpp-fcl.git --recursive
9185 cd hpp-fcl
9286 mkdir build && cd build
93- cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3)
87+ cmake .. \
88+ -G "Ninja" \
89+ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
90+ -DCMAKE_BUILD_TYPE=Release \
91+ -DPYTHON_EXECUTABLE=$(which python3)
9492
9593 - name : Uninstall EigenPy
96- shell : bash -l {0}
94+ shell : bash -el {0}
9795 run : |
9896 cd build
99- make uninstall
97+ cmake --build . --target uninstall
10098
10199
102100 check :
0 commit comments