Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ccache #2129

Merged
merged 22 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ed0597b
ci: Fix ccache env variable and use Ninja in Linux/MacOS build
jorisv Jan 9, 2024
f5c25e3
ci: Add Python version in cache key
jorisv Jan 9, 2024
37b3d74
ci: Use the right environment
jorisv Jan 9, 2024
d95ba2e
ci: Use ccache in Windows build
jorisv Jan 9, 2024
63f1335
[ci] Deactivate ctest verbose
jorisv Jan 9, 2024
0f419db
ci: Build Python interface in Windows build
jorisv Jan 9, 2024
28db6ad
cmake: Fix binding output path on Windows
jorisv Jan 10, 2024
f6c8e38
python: Add code to manage dll in non standard directory
jorisv Jan 10, 2024
d23d233
ci: Define PINOCCHIO_WINDOWS_DLL_PATH when running tests
jorisv Jan 10, 2024
8166168
cmake: Use a generator expression to bind dll directory
jorisv Jan 10, 2024
bf2626b
cmake: Modify the PATH to allow python_parser test to run
jorisv Jan 10, 2024
b1041e7
cmake: Fix ; escaping
jorisv Jan 11, 2024
4ecbed8
cmake: Setup back environment PYTHONPATH when running python parser test
jorisv Jan 11, 2024
395e783
ci: Merge Windows build
jorisv Jan 11, 2024
3cad12d
ci: Add verbose tests output to debug ros ci
jorisv Jan 11, 2024
4d5573a
ci: Fix a typo
jorisv Jan 11, 2024
1894f3a
ci: Add PATH to all unit tests and examples on windows
jorisv Jan 11, 2024
c8ad1a4
ci: Try to debug ROS CI
jorisv Jan 11, 2024
57c6ef1
ci: Revert ROS verbose output and fix cache setup
jorisv Jan 11, 2024
87b930c
python: Restore DllDirectory state after importing Pinocchio
jorisv Jan 12, 2024
357e215
python: clean __init__.py
jorisv Jan 12, 2024
8a1119e
python: clean __init__.py
jorisv Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/conda/conda-env-macos-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: pinocchio
channels:
- conda-forge
- nodefaults
dependencies:
- eigen=3.4.0
- hpp-fcl
- numpy
- boost
- eigenpy
- urdfdom
- python
- mamba
- cmake
- ccache
- llvm-openmp
- cxx-compiler
- pkg-config
68 changes: 45 additions & 23 deletions .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ on: [push,pull_request]

jobs:
pinocchio-conda:
name: Pinocchio on ${{ matrix.os }} in ${{ matrix.build_type }} mode with Conda
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} with Conda
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: ${{ matrix.CCACHE_DIR }}
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
BUILD_ADVANCED_TESTING: ${{ matrix.BUILD_ADVANCED_TESTING }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
build_type: [Release, Debug]
python-version: ["3.8", "3.12"]

include:
- os: ubuntu-latest
CCACHE_DIR: /home/runner/.ccache
BUILD_ADVANCED_TESTING: OFF
- os: macos-latest
CCACHE_DIR: /Users/runner/.ccache
BUILD_ADVANCED_TESTING: ON

steps:
Expand All @@ -31,40 +33,60 @@ jobs:

- uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-conda-${{ matrix.os }}-${{ matrix.build_type }}
path: .ccache
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-

- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pinocchio
auto-update-conda: true
environment-file: .github/workflows/conda/conda-env.yml
python-version: 3.8
environment-file: .github/workflows/conda/conda-env-macos-linux.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Install cmake and update conda
shell: bash -l {0}
run: |
conda activate pinocchio
conda install cmake ccache llvm-openmp compilers=1.4.2 -c conda-forge
conda list

- name: Build Pinocchio
shell: bash -l {0}
shell: bash -el {0}
run: |
conda activate pinocchio
conda list
echo $CONDA_PREFIX

mkdir build
cd build

cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=${{ env.BUILD_ADVANCED_TESTING }} -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON -DINSTALL_DOCUMENTATION=ON -DOpenMP_ROOT=$CONDA_PREFIX
make
make build_tests
CTEST_OUTPUT_ON_FAILURE=1 make test
make install
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_WITH_COLLISION_SUPPORT=ON \
-DBUILD_ADVANCED_TESTING=${{ env.BUILD_ADVANCED_TESTING }} \
-DBUILD_WITH_CASADI_SUPPORT=OFF \
-DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_WITH_OPENMP_SUPPORT=ON \
-DINSTALL_DOCUMENTATION=ON \
-DOpenMP_ROOT=$CONDA_PREFIX
cmake --build . -j2
ctest --output-on-failure
cmake --install .

- name: Uninstall Pinocchio
shell: bash -l {0}
shell: bash -el {0}
run: |
cd build
make uninstall
cmake --build . --target uninstall

check:
if: always()
name: check-macos-linux-conda

needs:
- pinocchio-conda

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
activate-environment: pinocchio
environment-file: .github/workflows/conda/conda-env.yml
environment-file: .github/workflows/conda/conda-env-windows.yml
python-version: 3.7
- name: Install cmake and update conda
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-v142.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
activate-environment: pinocchio
environment-file: .github/workflows/conda/conda-env.yml
environment-file: .github/workflows/conda/conda-env-windows.yml
python-version: 3.7
- name: Install cmake and update conda
run: |
Expand Down
Loading