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

Add conda linux workflow #4

Merged
merged 7 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .github/workflows/conda/conda-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

name: pinocchio-rerun
channels:
- conda-forge
dependencies:
- python
- cmake
- ninja
- cxx-compiler
- ccache
- gtest
- pinocchio
- eigen
- rerun-sdk
- librerun-sdk
- fmt
- example-robot-data
113 changes: 113 additions & 0 deletions .github/workflows/linux-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CI on Linux via Conda

on:
push:
branches:
- main
paths-ignore:
- '*.md'
- '.gitignore'
pull_request:
paths-ignore:
- '*.md'
- '.gitignore'

defaults:
run:
shell: bash -el {0}

jobs:
pinocchio-rerun-conda:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}

env:
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6

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

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout pinocchio-visualizers
uses: actions/checkout@v4
with:
repository: ManifoldFR/pinocchio-visualizers
submodules: recursive
path: ./visualizers

- uses: actions/cache@v4
with:
path: .ccache
key: ccache-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ github.sha }}
restore-keys: ccache-conda-${{ matrix.os }}-${{ matrix.build_type }}-

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

- name: Build pinocchio-visualizers
run: |
cd ./visualizers
conda activate pinrerun
mkdir build && cd build

cmake .. \
-GNinja \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --target install

- name: Build pinrerun
run: |
conda activate pinrerun

mkdir build && cd build

cmake .. \
-GNinja \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_PYTHON_INTERFACE=ON \
-DBUILD_DOCUMENTATION=OFF \
-DGENERATE_PYTHON_STUBS=ON
cmake --build .
ctest --output-on-failure
cmake --install .

- name: Uninstall pinrerun
run: |
conda activate pinrerun
cd build
cmake --build . --target uninstall

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

needs:
- pinocchio-rerun-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 CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.18)
set(PROJECT_NAME septum)
set(PROJECT_URL "https://github.com/ManifoldFR/pin-viz-cpp")
set(PROJECT_URL "https://github.com/ManifoldFR/pinocchio-rerun")
set(PROJECT_DESCRIPTION "A C++-based visualizer for Pinocchio using rerun")
set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
set(PROJECT_VERSION 0.1.0)
Expand Down