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/pixi build #791

Merged
merged 7 commits into from
Apr 2, 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
46 changes: 7 additions & 39 deletions .github/workflows/pixi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,21 @@ name: Pixi (conda)

on: [push, pull_request]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# Note if this value is changed, has to be manually updated in the `windows-latest` tests_command
BUILD_TYPE: Release

jobs:
pixi_conda_build:
strategy:
matrix:
include:
- os: windows-latest
build_depend: vs2022_win-64=19.*
tests_command: "'PATH=\\\"$PATH;build/Release\\\" build/tests/Release/behaviortree_cpp_test.exe'"
- os: ubuntu-latest
build_depend: "gxx=12.2.*"
tests_command: "./build/tests/behaviortree_cpp_test"
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
# Pixi is the tool used to create/manage conda environment
- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.7.0
locked: false
frozen: false
run-install: false
manifest-path: build-env/pixi.yaml
- name: Make pixi workspace
run: |
pixi init build-env
- name: Install dependencies
working-directory: ${{github.workspace}}/build-env
run: |
pixi add cmake zeromq=4.3.4 gtest=1.12.* gmock=1.12.* sqlite=3.40.* ${{ matrix.build-depend }}
pixi install
- name: Create Build Directory
working-directory: ${{github.workspace}}/build-env
run: mkdir build
- uses: actions/checkout@v3
- uses: prefix-dev/setup-pixi@v0.4.1
with:
path: build-env/BehaviorTree.CPP
pixi-version: v0.16.1
- name: Build
working-directory: ${{github.workspace}}/build-env
run: |
pixi task add build "cd build; cmake ../BehaviorTree.CPP -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}; cmake --build . --parallel --config ${{env.BUILD_TYPE}}"
pixi run build
run: pixi run build
- name: Run tests
working-directory: ${{github.workspace}}/build-env
run: |
pixi task add tests ${{ matrix.tests_command }}
pixi run tests
run: pixi run test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ CMakeSettings.json

# OSX junk
.DS_Store

# pixi environments
.pixi

CMakeUserPresets.json
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ target_link_libraries(${BTCPP_LIBRARY}
Threads::Threads
${CMAKE_DL_LIBS}
$<BUILD_INTERFACE:foonathan::lexy>
PUBLIC
${BTCPP_EXTRA_LIBRARIES}
)

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![conan Windows](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/cmake_windows.yml/badge.svg)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/cmake_windows.yml)
[![ros1](https://github.com/BehaviorTree/BehaviorTree.CPP/workflows/ros1/badge.svg?branch=master)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions?query=workflow%3Aros1)
[![ros2](https://github.com/BehaviorTree/BehaviorTree.CPP/workflows/ros2/badge.svg?branch=master)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions?query=workflow%3Aros2)
[![pixi (Conda)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/pixi.yaml/badge.svg)](https://github.com/BehaviorTree/BehaviorTree.CPP/actions/workflows/pixi.yaml)

# BehaviorTree.CPP 4.5

Expand Down Expand Up @@ -87,6 +88,11 @@ cmake ../BehaviorTree.CPP
cmake --build . --parallel
```

If you want to build in a [pixi](https://pixi.sh/) project (conda virtual environment).
```
pixi run build
```

If you want to use BT.CPP in your application, please refer to the
example here: https://github.com/BehaviorTree/btcpp_sample .

Expand Down
Loading
Loading