Skip to content

Commit

Permalink
Merge pull request #21 from RoboStack/fresh-builds
Browse files Browse the repository at this point in the history
Fresh builds
  • Loading branch information
Tobias-Fischer authored Dec 8, 2022
2 parents 6ea1c38 + 1eb1092 commit aa53ed0
Show file tree
Hide file tree
Showing 30 changed files with 368 additions and 508 deletions.
383 changes: 152 additions & 231 deletions .ci_support/conda_forge_pinnings.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/testpr_environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: base
name: testpr_env
channels:
- robostack-humble
- robostack-staging
- conda-forge
dependencies:
- python 3.9.*
- python 3.10.*
- pip
- boa
- rospkg
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_robostack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- os: ubuntu-latest
ARCH: x86_64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-comp7
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "rosdesktop"
OS_NAME: "Linux"

Expand Down Expand Up @@ -87,4 +87,4 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-python@v2
with:
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install vinca
run: |
pip install git+https://github.com/RoboStack/vinca.git
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
platform: [linux-64, osx-64, win-64, linux-aarch64, osx-arm64]
platform: [linux-64, linux-aarch64, osx-64, win-64, osx-arm64]
exclude:
- os: ubuntu-latest
platform: win-64
Expand All @@ -33,16 +33,13 @@ jobs:
- os: windows-2019
platform: osx-arm64
steps:
- uses: actions/checkout@main
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@master
- name: install mamba
uses: mamba-org/provision-with-micromamba@main
with:
mamba-version: "*"
channels: robostack-humble,conda-forge
channel-priority: false
auto-activate-base: true
activate-environment: ""
environment-file: .github/testpr_environment.yml

- shell: bash
- shell: bash -l {0}
if: contains(matrix.os, 'linux-aarch64')
run: |
echo "::group::Configure binfmt_misc"
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vinca.yaml
recipes/
*.bat
*.sh
*.json
.DS_Store
1 change: 1 addition & 0 deletions .scripts/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ conda config --set remote_max_retries 5
# conda config --append channels defaults
conda config --add channels conda-forge
conda config --add channels robostack-humble
conda config --add channels robostack-staging
conda config --add channels $CONDA_BLD_PATH
conda config --remove channels defaults
# conda config --set channel_priority strict
Expand Down
1 change: 1 addition & 0 deletions .scripts/build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ conda config --set add_pip_as_python_dependency false

conda config --add channels conda-forge
conda config --add channels robostack-humble
conda config --add channels robostack-staging
conda config --add channels $CONDA_BLD_PATH
# conda config --set channel_priority strict

Expand Down
1 change: 1 addition & 0 deletions .scripts/build_osx_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ conda config --set add_pip_as_python_dependency false

conda config --add channels conda-forge
conda config --add channels robostack-humble
conda config --add channels robostack-staging
conda config --add channels $CONDA_BLD_PATH
# conda config --set channel_priority strict

Expand Down
1 change: 1 addition & 0 deletions .scripts/build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ call conda index %CONDA_BLD_PATH%
call conda config --remove channels defaults
call conda config --add channels conda-forge
call conda config --add channels robostack-humble
call conda config --add channels robostack-staging
call conda config --add channels %CONDA_BLD_PATH%
:: call conda config --set channel_priority strict

Expand Down
40 changes: 13 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,24 @@ We follow the [NumFOCUS code of conduct](https://numfocus.org/code-of-conduct).
# Adding new packages via pull requests
You can open a pull request that will get build automatically in our CI.

An example can be found [here](https://github.com/RoboStack/ros-galactic/pull/44). Simply add the required packages to the `vinca_*.yaml` files, where the * indicates the desired platform (linux_64, osx, win or linux_aarch64). Ideally, try to add packages to all of these platforms.
An example can be found [here](https://github.com/RoboStack/ros-noetic/pull/44). Simply add the required packages to the `vinca_*.yaml` files, where the * indicates the desired platform (linux_64, osx, win or linux_aarch64). Ideally, try to add packages to all of these platforms.

Sometimes, it may be required to patch the packages. An example of how to do so can be found in [this PR](https://github.com/RoboStack/ros-galactic/pull/32).
Sometimes, it may be required to patch the packages. An example of how to do so can be found in [this PR](https://github.com/RoboStack/ros-noetic/pull/32).


# Testing changes locally

1. Install conda build tools in base environemnt:
```
conda install -n base conda-build mamba
```

2. Create a new conda environment and add the conda-forge and robostack channels:
```
conda create -n ros_humble python=3.9
conda activate ros_humble
conda config --append channels defaults
conda config --add channels conda-forge
conda config --add channels robostack-humble
```
3. Install some dependencies:
```
mamba install anaconda-client catkin_pkg ruamel_yaml rosdistro empy networkx requests ruamel ruamel.yaml boa
```
4. Install vinca: `pip install git+https://github.com/RoboStack/vinca.git@master --no-deps`
5. Clone this repo: `git clone https://github.com/RoboStack/ros-humble.git`
6. `cd ros-humble`
7. `cp vinca_linux_64.yaml vinca.yaml` (replace with your platform as necessary)
8. Modify `vinca.yaml` as you please, e.g. add new packages to be built.
9. Run vinca to generate the recipe by executing `vinca --multiple`
10. Copy the generated recipe to the current folder: `cp recipes/ros-humble-XXX.yaml recipe.yaml` - note that at least one package needs to be (re)build for this folder to show up. See more info below.
11. Build the recipe using boa: `boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml`
1. Clone this repo: `git clone https://github.com/RoboStack/ros-humble.git`
2. `cd ros-humble`
3. `conda env create -f env/robostackenv.yaml `
4. Make a symbolic link between your platform's yaml and `vinca.yaml`. Examples
* `ln -s vinca_linux_64.yaml vinca.yaml`
* `ln -s vinca_osx.yaml vinca.yaml`
* `mklink vinca.yaml vinca_win.yaml`
5. Modify your platform's yaml as you please, e.g. add new packages to be built.
6. Run vinca to generate the recipe by executing `vinca --multiple`
7. Move to the `recipes` folder to find the recipes that need to be (re)build: `cd recipes`. Note that at least one package needs to be (re)build for folder to show up.
8. Build the recipes from within the `recipes` folder using boa: `boa build . -m ../.ci_support/conda_forge_pinnings.yaml -m ../conda_build_config.yaml`

# How does it work?
- The `vinca.yaml` file specifies which packages should be built.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ To get started with conda (or mamba) as package managers, you need to have a bas
conda install mamba -c conda-forge

# now create a new environment
mamba create -n ros_humble ros-humble-desktop python=3.9 spdlog=1.9.2 foonathan-memory=0.7.2 -c robostack-humble -c conda-forge --no-channel-priority --override-channels
mamba create -n ros_humble ros-humble-desktop python=3.10 -c robostack-humble -c conda-forge --no-channel-priority --override-channels
conda activate ros_humble

# optionally, install some compiler packages if you want to e.g. build packages in a colcon_ws:
mamba install compilers cmake=3.23 pkg-config make ninja colcon-common-extensions
mamba install compilers cmake pkg-config make ninja colcon-common-extensions

# on Windows, install Visual Studio 2017 or 2019 with C++ support
# see https://docs.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-160
Expand Down
20 changes: 20 additions & 0 deletions additional_recipes/ros-humble-octomap/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package:
name: ros-humble-octomap
version: "1.9.8"

build:
number: 2

requirements:
run:
- octomap 1.9.*


about:
home: https://github.com/conda-forge/octomap-feedstock
license: BSD-3-Clause
summary: |
An Efficient Probabilistic 3D Mapping Framework Based on Octrees
extra:
recipe-maintainers:
- ros-forge
10 changes: 4 additions & 6 deletions additional_recipes/ros2-distro-mutex/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package:
name: ros2-distro-mutex
version: 0.1.0
version: 0.2.0

build:
number: 0
string: humble
run_exports:
# NOTE MANUALLY EDIT THIS!!!!
- ros2-distro-mutex 0.1 humble
- ros2-distro-mutex 0.2 humble

requirements:
# NOTE:
Expand All @@ -30,14 +30,12 @@ requirements:
# if the upstream package does not have run_exports
# please change it in the conda_build_config.yaml!
run_constrained:
- boost-cpp 1.74
- log4cxx 0.11
- boost-cpp 1.78
- pcl 1.12
- libopencv 4.5.5
- poco 1.11
- gazebo 11
- ogre 1.12
- libpqxx 6
- setuptools 61.0.0

about:
home: https://github.com/robostack/ros-humble
Expand Down
42 changes: 17 additions & 25 deletions conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
c_compiler:
- vs2019 # [win]
cxx_compiler:
- vs2019 # [win]

console_bridge:
- 1.0
assimp:
- 5.2.5
hdf5:
- 1.12.2
gazebo:
- '11'
libpqxx:
- 6
numpy:
- 1.19
- 1.21
pcl:
- 1.12.1
ogre:
- 1.12.*
pcl:
- 1.12.0
libpqxx:
- 6

# Workaround for https://github.com/RoboStack/ros-galactic/pull/86#issuecomment-1079811424
setuptools: # [win]
- 61.0.0 # [win]
qt:
- 5.15
qt-main:
- 5.15

cdt_name: # [linux]
- cos7 # [linux]

python:
# part of a zip_keys: python, python_impl, numpy
# - 3.6.* *_cpython # [not (osx and arm64)]
# - 3.7.* *_cpython # [not (osx and arm64)]
# - 3.8.* *_cpython
- 3.9.* *_cpython
- 3.10.* *_cpython
python_impl:
# part of a zip_keys: python, python_impl, numpy
# - cpython # [not (osx and arm64)]
# - cpython # [not (osx and arm64)]
- cpython

# Project overrides
macos_min_version: # [osx and x86_64]
- 10.14 # [osx and x86_64]
macos_machine: # [osx]
Expand Down
21 changes: 21 additions & 0 deletions env/robostackenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: robostackenv
channels:
- robostack-humble
- robostack-staging
- conda-forge
dependencies:
- python=3.10
- conda-build
- anaconda-client
- mamba
- conda
- catkin_pkg
- ruamel.yaml
- rosdistro
- empy
- networkx
- requests
- boa=0.9
- pip
- pip:
- git+https://github.com/RoboStack/vinca.git@master
18 changes: 17 additions & 1 deletion patch/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ros_ign_interfaces:
add_host: ["ros-humble-rcl-interfaces"]
cartographer_ros:
add_host: ["cartographer 2.*"]
ackermann_msgs:
Expand Down Expand Up @@ -107,7 +109,9 @@ backward_ros:
add_host: [{sel(linux or (osx and x86_64)): binutils}, {sel(linux): elfutils}]
nav2_smac_planner:
add_build: [{"sel(osx)": "llvm-openmp"}]
add_host: [{"sel(osx)": "llvm-openmp"}]
add_host: [{"sel(osx)": "llvm-openmp"}, "ompl", "libode"]
ompl:
add_host: ["ompl"]
pybind11_vendor:
add_host: ["pybind11"]
add_run: ["pybind11"]
Expand Down Expand Up @@ -171,3 +175,15 @@ moveit:
add_host: ["REQUIRE_OPENGL"]
force_torque_sensor_broadcaster:
add_host: ["typeguard", "jinja2"]
ros_workspace:
add_build: ["setuptools 61.0.0"]
ros_environment:
add_build: ["setuptools 61.0.0"]
ament_package:
add_build: ["setuptools 61.0.0"]
ament_cmake_core:
add_build: ["setuptools 61.0.0"]
ros_gz_sim:
add_host: ["REQUIRE_OPENGL"]
geometric_shapes:
add_host: ["octomap"]
22 changes: 0 additions & 22 deletions patch/ros-humble-ament-cmake-export-targets.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patch/ros-humble-apex-containers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebab722..452127f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,8 +27,6 @@ set(apex_containers_sources
set_source_files_properties(${apex_containers_sources} PROPERTIES language "CXX")
add_library(${PROJECT_NAME} SHARED ${apex_containers_sources})
target_compile_options(${PROJECT_NAME} PRIVATE
- -Wall
- -Werror
-Wextra
-pedantic
-Wcast-align
Loading

0 comments on commit aa53ed0

Please sign in to comment.