Skip to content

Commit

Permalink
added meta for boost
Browse files Browse the repository at this point in the history
  • Loading branch information
berndgassmann committed Jan 29, 2024
1 parent fe6a4e9 commit 3e51f17
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
58 changes: 44 additions & 14 deletions .github/workflows/compile_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,52 @@ BOOST_VERSION="$1"
BOOST_PACKAGE="boost_${BOOST_VERSION//./_}"
ROOT_DIR="$PWD"

pushd dependencies
wget "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/${BOOST_PACKAGE}.tar.gz"
tar -xzf ${BOOST_PACKAGE}.tar.gz
pushd ${BOOST_PACKAGE}

py3="/usr/bin/env python${PYTHON_BINDING_VERSION}"
py3_root=`${py3} -c "import sys; print(sys.prefix)"`
pyv=`$py3 -c "import sys;x='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(x)";`
if [[ "${PYTHON_BINDING_VERSION}" == "3.10" ]]; then

./bootstrap.sh \
--prefix=${ROOT_DIR}/install/boost
pushd dependencies
wget "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/${BOOST_PACKAGE}.tar.gz"
tar -xzf ${BOOST_PACKAGE}.tar.gz
pushd ${BOOST_PACKAGE}

py3="/usr/bin/env python${PYTHON_BINDING_VERSION}"
py3_root=`${py3} -c "import sys; print(sys.prefix)"`
pyv=`$py3 -c "import sys;x='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(x)";`

./bootstrap.sh \
--prefix=${ROOT_DIR}/install/boost
--with-libraries=python,filesystem,system,program_options \
--with-python=${py3} --with-python-root=${py3_root}
--with-python=${py3} --with-python-root=${py3_root}

./b2 --prefix="${ROOT_DIR}/install/boost" cxxflags="-fPIC" -j 10 stage release
./b2 --prefix="${ROOT_DIR}/install/boost" cxxflags="-fPIC" -j 10 install

popd
popd

cat >colcon_boost.meta <<EOF
{
"names": {
"ad_physics": {
"cmake-args": ["-DCMAKE_MODULE_PATH=${ROOT_DIR}/install/boost;${CMAKE_MODULE_PATH}"]
},
"ad_map_opendrive_reader": {
"cmake-args": ["-DCMAKE_MODULE_PATH=${ROOT_DIR}/install/boost;${CMAKE_MODULE_PATH}"]
},
"ad_map_access": {
"cmake-args": ["-DCMAKE_MODULE_PATH=${ROOT_DIR}/install/boost;${CMAKE_MODULE_PATH}"]
},
"ad_rss": {
"cmake-args": ["-DCMAKE_MODULE_PATH=${ROOT_DIR}/install/boost;${CMAKE_MODULE_PATH}"]
},
"ad_rss_map_integration": {
"cmake-args": ["-DCMAKE_MODULE_PATH=${ROOT_DIR}/install/boost;${CMAKE_MODULE_PATH}"]
}
}
}
EOF

./b2 --prefix="${ROOT_DIR}/install/boost" cxxflags="-fPIC" -j 10 stage release
./b2 --prefix="${ROOT_DIR}/install/boost" cxxflags="-fPIC" -j 10 install
fi

popd
popd
# create colon_boost.meta
touch colcon_boost.meta
3 changes: 1 addition & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
- name: Build boost
shell: bash
run: |
if [[ "${PYTHON_BINDING_VERSION}" == "3.10" ]]; then
# we need to compile boost on our own for support of 3.10 python
source .github/workflows/compile_boost.sh 1.74.0
fi
Expand All @@ -55,7 +54,7 @@ jobs:
run: |
colcon build --packages-select PROJ4 --event-handlers console_direct+ --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE=ON
source install/setup.bash
colcon build --packages-up-to ad_rss_map_integration --meta colcon_python.meta --event-handlers console_direct+ --cmake-args -DPYTHON_BINDING_VERSION=${PYTHON_BINDING_VERSION}
colcon build --packages-up-to ad_rss_map_integration --event-handlers console_direct+ --cmake-args -DPYTHON_BINDING_VERSION=${PYTHON_BINDING_VERSION} --metas colcon_python.meta colcon_boost.meta
- name: Repair wheels
shell: bash
Expand Down

0 comments on commit 3e51f17

Please sign in to comment.