Skip to content

Commit 9b87983

Browse files
committed
Add build files 2025-02-28-1346
1 parent dc2c68e commit 9b87983

30 files changed

+1663
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
jobs:
2+
stage_0_job_0:
3+
name: nav2-minimal-tb4-description nav2-minimal-tb3-sim nav2-minimal-tb4-sim nav2-bringup
4+
runs-on: ubuntu-24.04-arm
5+
strategy:
6+
fail-fast: false
7+
needs: []
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v4
11+
- name: Build ros-jazzy-nav2-minimal-tb4-description ros-jazzy-nav2-minimal-tb3-sim
12+
ros-jazzy-nav2-minimal-tb4-sim ros-jazzy-nav2-bringup
13+
env:
14+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
15+
CURRENT_RECIPES: ros-jazzy-nav2-minimal-tb4-description ros-jazzy-nav2-minimal-tb3-sim
16+
ros-jazzy-nav2-minimal-tb4-sim ros-jazzy-nav2-bringup
17+
DOCKER_IMAGE: condaforge/linux-anvil-aarch64
18+
run: |
19+
export CI=azure
20+
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
21+
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
22+
.scripts/build_linux.sh
23+
name: build_linux
24+
on:
25+
push:
26+
branches:
27+
- buildbranch_linux_aarch64

activate.bat

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
@if not defined CONDA_PREFIX goto:eof
4+
5+
@REM Don't do anything when we are in conda build.
6+
@if defined SYS_PREFIX exit /b 0
7+
8+
@set "QT_PLUGIN_PATH=%CONDA_PREFIX%\Library\plugins"
9+
10+
@call "%CONDA_PREFIX%\Library\local_setup.bat"
11+
@set PYTHONHOME=
12+
@set "ROS_OS_OVERRIDE=conda:win64"
13+
@set "ROS_ETC_DIR=%CONDA_PREFIX%\Library\etc\ros"
14+
@set "AMENT_PREFIX_PATH=%CONDA_PREFIX%\Library"
15+
@set "AMENT_PYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe"

activate.ps1

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
if ($null -eq ${env:CONDA_PREFIX}) { Exit }
4+
5+
# Don't do anything when we are in conda build.
6+
if ($null -ne ${env:SYS_PREFIX}) { Exit 0 }
7+
8+
$Env:QT_PLUGIN_PATH="${env:CONDA_PREFIX}\Library\plugins"
9+
10+
& "${env:CONDA_PREFIX}\Library\local_setup.ps1"
11+
12+
$Env:PYTHONHOME=''
13+
$Env:ROS_OS_OVERRIDE='conda:win64'
14+
$Env:ROS_ETC_DIR="${env:CONDA_PREFIX}\Library\etc\ros"
15+
$Env:AMENT_PREFIX_PATH="${env:CONDA_PREFIX}\Library"
16+
$Env:AMENT_PYTHON_EXECUTABLE="${env:CONDA_PREFIX}\python.exe"

activate.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
# if [ -z "${CONDA_PREFIX}" ]; then
4+
# exit 0;
5+
# fi
6+
7+
# Not sure if this is necessary on UNIX?
8+
# export QT_PLUGIN_PATH=$CONDA_PREFIX\plugins
9+
10+
if [ "$CONDA_BUILD" = "1" -a "$target_platform" != "$build_platform" ]; then
11+
# ignore sourcing
12+
echo "Not activating ROS when cross-compiling";
13+
else
14+
source $CONDA_PREFIX/setup.sh
15+
fi
16+
17+
case "$OSTYPE" in
18+
darwin*) export ROS_OS_OVERRIDE="conda:osx";;
19+
linux*) export ROS_OS_OVERRIDE="conda:linux";;
20+
esac
21+
22+
export ROS_ETC_DIR=$CONDA_PREFIX/etc/ros
23+
export AMENT_PREFIX_PATH=$CONDA_PREFIX
24+
25+
# Looks unnecessary for UNIX
26+
# unset PYTHONHOME=

bld_ament_cmake.bat

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal EnableDelayedExpansion
4+
5+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
6+
7+
:: MSVC is preferred.
8+
set CC=cl.exe
9+
set CXX=cl.exe
10+
11+
rd /s /q build
12+
mkdir build
13+
pushd build
14+
15+
:: set "CMAKE_GENERATOR=Ninja"
16+
:: We use the Visual Studio generator as a workaround for
17+
:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467
18+
:: Once those are solved, we can switch back to use Ninja
19+
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
20+
21+
:: PYTHON_INSTALL_DIR should be a relative path, see
22+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
23+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
24+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
25+
:: python
26+
27+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
28+
:: to the variable specified after DO SET
29+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
30+
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i
31+
32+
cmake ^
33+
-G "%CMAKE_GENERATOR%" ^
34+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
35+
-DCMAKE_BUILD_TYPE=Release ^
36+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
37+
-DPYTHON_EXECUTABLE=%PYTHON% ^
38+
-DPython_EXECUTABLE=%PYTHON% ^
39+
-DPython3_EXECUTABLE=%PYTHON% ^
40+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
41+
-DBUILD_SHARED_LIBS=ON ^
42+
-DBUILD_TESTING=OFF ^
43+
-DCMAKE_OBJECT_PATH_MAX=255 ^
44+
--compile-no-warning-as-error ^
45+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
46+
%SRC_DIR%\%PKG_NAME%\src\work
47+
if errorlevel 1 exit 1
48+
49+
:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja,
50+
:: see the comment before setting the CMAKE_GENERATOR env variable
51+
cmake --build . --config Release --parallel %CPU_COUNT% --target install
52+
if errorlevel 1 exit 1

bld_ament_python.bat

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
6+
7+
pushd %SRC_DIR%\%PKG_NAME%\src\work
8+
set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%"
9+
set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%"
10+
11+
:: If there is a setup.cfg that contains install-scripts then use pip to install
12+
findstr install[-_]scripts setup.cfg
13+
if "%errorlevel%" == "0" (
14+
%PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^
15+
--prefix=%LIBRARY_PREFIX% ^
16+
--install-lib=%SP_DIR% ^
17+
--install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT%
18+
) else (
19+
%PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^
20+
--prefix=%LIBRARY_PREFIX% ^
21+
--install-lib=%SP_DIR% ^
22+
--install-scripts=%LIBRARY_PREFIX%\bin
23+
)
24+
25+
if errorlevel 1 exit 1

bld_catkin.bat

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"
5+
6+
:: MSVC is preferred.
7+
set CC=cl.exe
8+
set CXX=cl.exe
9+
10+
:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
11+
:: if ROS (1) is build as shared library . However, some packages are not
12+
:: passing compilation flags from CMake to other build systems (such as qmake),
13+
:: so we enable it explicitly via the CL environment variable, see
14+
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
15+
set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1
16+
17+
set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1"
18+
if "%PKG_NAME%" == "ros-jazzy-catkin" (
19+
:: create catkin cookie to make it is a catkin workspace
20+
type NUL > %LIBRARY_PREFIX%\.catkin
21+
:: keep the workspace activation scripts (e.g., local_setup.bat)
22+
set CATKIN_BUILD_BINARY_PACKAGE_ARGS=
23+
)
24+
25+
rd /s /q build
26+
mkdir build
27+
pushd build
28+
29+
set SKIP_TESTING=ON
30+
31+
cmake ^
32+
-G "Ninja" ^
33+
--compile-no-warning-as-error ^
34+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
35+
-DCMAKE_BUILD_TYPE=Release ^
36+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^
37+
-DBUILD_SHARED_LIBS=ON ^
38+
-DPYTHON_EXECUTABLE=%PYTHON% ^
39+
-DPython_EXECUTABLE=%PYTHON% ^
40+
-DPython3_EXECUTABLE=%PYTHON% ^
41+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
42+
-DBoost_USE_STATIC_LIBS=OFF ^
43+
%CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^
44+
-DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^
45+
%SRC_DIR%\%PKG_NAME%\src\work
46+
if errorlevel 1 exit 1
47+
48+
if "%PKG_NAME%" == "ros-jazzy-eigenpy" (
49+
cmake --build . --config Release --target all --parallel 1
50+
if errorlevel 1 exit 1
51+
) else (
52+
cmake --build . --config Release --target all
53+
if errorlevel 1 exit 1
54+
)
55+
56+
if "%SKIP_TESTING%" == "OFF" (
57+
cmake --build . --config Release --target run_tests
58+
if errorlevel 1 exit 1
59+
)
60+
61+
cmake --build . --config Release --target install
62+
if errorlevel 1 exit 1
63+
64+
if "%PKG_NAME%" == "ros-jazzy-catkin" (
65+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
66+
:: This will allow them to be run on environment activation.
67+
for %%F in (activate deactivate) DO (
68+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
69+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
70+
)
71+
)
72+
73+
if "%PKG_NAME%" == "ros-jazzy-ros-workspace" (
74+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
75+
:: This will allow them to be run on environment activation.
76+
for %%F in (activate deactivate) DO (
77+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
78+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
79+
copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1
80+
)
81+
)

bld_catkin_merge.bat

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
:: MSVC is preferred.
6+
set CC=cl.exe
7+
set CXX=cl.exe
8+
9+
:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin
10+
:: if ROS (1) is build as shared library . However, some packages are not
11+
:: passing compilation flags from CMake to other build systems (such as qmake),
12+
:: so we enable it explicitly via the CL environment variable, see
13+
:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
14+
set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1
15+
16+
set CATKIN_MAKE_ISOLATED=src\ros-jazzy-catkin\bin\catkin_make_isolated
17+
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH:\=/%
18+
19+
%PYTHON% %CATKIN_MAKE_ISOLATED% ^
20+
--install-space %LIBRARY_PREFIX% ^
21+
--use-ninja ^
22+
--install ^
23+
-DCMAKE_BUILD_TYPE=Release ^
24+
-DBUILD_SHARED_LIBS=ON ^
25+
-DPYTHON_EXECUTABLE=%PYTHON% ^
26+
-DCATKIN_SKIP_TESTING=ON
27+
if errorlevel 1 exit 1
28+
29+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
30+
:: This will allow them to be run on environment activation.
31+
for %%F in (activate deactivate) DO (
32+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
33+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
34+
)

bld_colcon_merge.bat

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
:: Generated by vinca http://github.com/RoboStack/vinca.
2+
:: DO NOT EDIT!
3+
setlocal
4+
5+
:: MSVC is preferred.
6+
set CC=cl.exe
7+
set CXX=cl.exe
8+
9+
:: PYTHON_INSTALL_DIR should be a relative path, see
10+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
11+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
12+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
13+
:: python
14+
15+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
16+
:: to the variable specified after DO SET
17+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
18+
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i
19+
20+
colcon build ^
21+
--event-handlers console_cohesion+ ^
22+
--merge-install ^
23+
--install-base %LIBRARY_PREFIX% ^
24+
--cmake-args ^
25+
--compile-no-warning-as-error ^
26+
-G Ninja ^
27+
-DCMAKE_BUILD_TYPE=Release ^
28+
-DBUILD_TESTING=OFF ^
29+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
30+
-DPYTHON_EXECUTABLE=%PYTHON%
31+
if errorlevel 1 exit 1
32+
33+
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d.
34+
:: This will allow them to be run on environment activation.
35+
for %%F in (activate deactivate) DO (
36+
if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d
37+
copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat
38+
)

0 commit comments

Comments
 (0)