Skip to content

Commit 6133536

Browse files
committed
Add build files 2026-04-04-1640
1 parent 62e6009 commit 6133536

18 files changed

Lines changed: 951 additions & 0 deletions

File tree

.github/workflows/win.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
jobs:
2+
stage_0_job_0:
3+
name: py-trees-ros-interfaces py-trees py-trees-js py-trees-ros py-trees-ros-viewer
4+
runs-on: windows-2022
5+
strategy:
6+
fail-fast: false
7+
needs: []
8+
env:
9+
CONDA_BLD_PATH: C:\\bld\\
10+
VINCA_CUSTOM_CMAKE_BUILD_DIR: C:\\x\\
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v6
14+
- name: Setup pixi
15+
uses: prefix-dev/setup-pixi@v0.9.4
16+
with:
17+
pixi-version: v0.63.2
18+
cache: 'true'
19+
- uses: egor-tensin/cleanup-path@v5
20+
with:
21+
dirs: C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Program
22+
Files\Git\mingw64\bin
23+
- shell: cmd
24+
run: |
25+
set "CI=true"
26+
27+
:: 4 cores available on GHA: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
28+
:: CPU_COUNT is passed through conda build: https://github.com/conda/conda-build/pull/1149
29+
set CPU_COUNT=4
30+
31+
set PYTHONUNBUFFERED=1
32+
33+
call setup_x64
34+
35+
:: Set the conda-build working directory to a smaller path
36+
if "%CONDA_BLD_PATH%" == "" (
37+
set "CONDA_BLD_PATH=C:\\bld\\"
38+
)
39+
40+
:: On azure, there are libcrypto*.dll & libssl*.dll under
41+
:: C:\\Windows\\System32, which should not be there (no vendor dlls in windows folder).
42+
:: They would be found before the openssl libs of the conda environment, so we delete them.
43+
if defined CI (
44+
DEL C:\\Windows\\System32\\libcrypto-1_1-x64.dll || (Echo Ignoring failure to delete C:\\Windows\\System32\\libcrypto-1_1-x64.dll)
45+
DEL C:\\Windows\\System32\\libssl-1_1-x64.dll || (Echo Ignoring failure to delete C:\\Windows\\System32\\libssl-1_1-x64.dll)
46+
)
47+
48+
:: Make paths like C:\\hostedtoolcache\\windows\\Ruby\\2.5.7\\x64\\bin garbage
49+
set "PATH=%PATH:ostedtoolcache=%"
50+
name: conda-forge build setup
51+
- shell: cmd
52+
run: |
53+
setlocal EnableExtensions EnableDelayedExpansion
54+
55+
set CONDA_BLD_PATH=C:\bld
56+
echo "PATH is %PATH%"
57+
58+
rmdir /Q/S C:\Strawberry\
59+
rmdir /Q/S "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\"
60+
61+
set "FEEDSTOCK_ROOT=%cd%"
62+
63+
mkdir %CONDA_BLD_PATH%
64+
65+
:: Enable long path names on Windows
66+
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
67+
68+
for %%X in (%CURRENT_RECIPES%) do (
69+
echo "BUILDING RECIPE %%X"
70+
cd %FEEDSTOCK_ROOT%\recipes\%%X\
71+
pixi run -v rattler-build build --recipe %FEEDSTOCK_ROOT%\recipes\%%X\ ^
72+
-m %FEEDSTOCK_ROOT%\conda_build_config.yaml ^
73+
-c robostack-kilted -c conda-forge ^
74+
--output-dir %CONDA_BLD_PATH%
75+
76+
if errorlevel 1 exit 1
77+
rem -m %FEEDSTOCK_ROOT%\.ci_support\conda_forge_pinnings.yaml
78+
)
79+
80+
:: Check if .conda files exist in the win-64 directory
81+
if exist "%CONDA_BLD_PATH%\win-64\*.conda" (
82+
echo Found .conda files, starting upload...
83+
for %%F in ("%CONDA_BLD_PATH%\win-64\*.conda") do (
84+
echo Uploading %%F
85+
pixi run upload "%%F" --force
86+
if errorlevel 1 exit 1
87+
)
88+
) else (
89+
echo Warning: No .conda files found in %CONDA_BLD_PATH%\win-64
90+
echo This might be due to all the packages being skipped
91+
)
92+
env:
93+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
94+
CURRENT_RECIPES: ros-kilted-py-trees-ros-interfaces ros-kilted-py-trees ros-kilted-py-trees-js
95+
ros-kilted-py-trees-ros ros-kilted-py-trees-ros-viewer
96+
PYTHONUNBUFFERED: 1
97+
name: Build ros-kilted-py-trees-ros-interfaces ros-kilted-py-trees ros-kilted-py-trees-js
98+
ros-kilted-py-trees-ros ros-kilted-py-trees-ros-viewer
99+
name: build_win
100+
on:
101+
push:
102+
branches:
103+
- buildbranch_win

buildorder.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ros-kilted-py-trees-ros-interfaces
2+
ros-kilted-py-trees
3+
ros-kilted-py-trees-js
4+
ros-kilted-py-trees-ros
5+
ros-kilted-py-trees-ros-viewer
Lines changed: 25 additions & 0 deletions
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-kilted-=%"
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
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by vinca http://github.com/RoboStack/vinca.
2+
# DO NOT EDIT!
3+
4+
set -eo pipefail
5+
6+
pushd $SRC_DIR/$PKG_NAME/src/work/
7+
8+
# If there is a setup.cfg that contains install-scripts then we should not set it here
9+
if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then
10+
# Remove e.g. ros-humble- from PKG_NAME
11+
PKG_NAME_SHORT=${PKG_NAME#*ros-kilted-}
12+
# Substitute "-" with "_"
13+
PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_}
14+
INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT"
15+
echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG"
16+
$PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt
17+
else
18+
$PYTHON -m pip install . --no-deps -vvv
19+
fi
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
2+
3+
package:
4+
name: ros-kilted-py-trees-js
5+
version: 0.6.6
6+
source:
7+
git: https://github.com/ros2-gbp/py_trees_js-release.git
8+
tag: release/kilted/py_trees_js/0.6.6-2
9+
target_directory: ros-kilted-py-trees-js/src/work
10+
11+
build:
12+
script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix or wasm32 else '%RECIPE_DIR%\\bld_ament_python.bat' }}
13+
number: 15
14+
post_process:
15+
- files:
16+
- '*.pc'
17+
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
18+
replacement: $$(CONDA_BUILD_SYSROOT_S)
19+
- files:
20+
- '*.cmake'
21+
regex: ([^;\s"]+/sysroot)
22+
replacement: $$ENV{CONDA_BUILD_SYSROOT}
23+
- files:
24+
- '*.cmake'
25+
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
26+
replacement: $$ENV{CONDA_BUILD_SYSROOT}
27+
about:
28+
homepage: https://github.com/splintered-reality/py_trees_js
29+
repository: https://github.com/splintered-reality/py_trees_js
30+
license: BSD-3-Clause
31+
summary: Javascript library for visualising behaviour trees.
32+
extra:
33+
recipe-maintainers:
34+
- ros-forge
35+
36+
requirements:
37+
build:
38+
- ${{ compiler('cxx') }}
39+
- ${{ compiler('c') }}
40+
- if: target_platform!='emscripten-wasm32'
41+
then:
42+
- ${{ stdlib('c') }}
43+
- ninja
44+
- python
45+
- setuptools
46+
- git
47+
- git-lfs
48+
- if: unix
49+
then:
50+
- patch
51+
- make
52+
- coreutils
53+
- if: win
54+
then:
55+
- m2-patch
56+
- if: osx
57+
then:
58+
- tapi
59+
- if: build_platform != target_platform
60+
then:
61+
- pkg-config
62+
- cmake
63+
- cython
64+
- if: build_platform != target_platform
65+
then:
66+
- python
67+
- cross-python_${{ target_platform }}
68+
- numpy
69+
host:
70+
- if: build_platform == target_platform
71+
then:
72+
- pkg-config
73+
- numpy
74+
- pip
75+
- poetry-core
76+
- python
77+
- ros-kilted-ros-environment
78+
- ros-kilted-ros-workspace
79+
- ros2-distro-mutex 0.13.* kilted_*
80+
- setuptools
81+
run:
82+
- pyqt
83+
- pyqt-builder
84+
- python
85+
- ros-kilted-ros-workspace
86+
- ros2-distro-mutex 0.13.* kilted_*
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
:: If defined, can use a custom CMake build directory which can be useful
12+
:: to avoid too long path problems on windows
13+
if defined VINCA_CUSTOM_CMAKE_BUILD_DIR (
14+
if not exist "%VINCA_CUSTOM_CMAKE_BUILD_DIR%\" (
15+
mkdir "%VINCA_CUSTOM_CMAKE_BUILD_DIR%"
16+
)
17+
cd /d "%VINCA_CUSTOM_CMAKE_BUILD_DIR%"
18+
)
19+
rd /s /q build
20+
mkdir build
21+
pushd build
22+
23+
:: set "CMAKE_GENERATOR=Ninja"
24+
:: We use the Visual Studio generator as a workaround for
25+
:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467
26+
:: Once those are solved, we can switch back to use Ninja
27+
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"
28+
29+
:: PYTHON_INSTALL_DIR should be a relative path, see
30+
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
31+
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
32+
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
33+
:: python
34+
35+
:: This line is scary, but it basically assigns the output of the command inside (` and `)
36+
:: to the variable specified after DO SET
37+
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
38+
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
39+
40+
cmake ^
41+
-G "%CMAKE_GENERATOR%" ^
42+
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
43+
-DCMAKE_BUILD_TYPE=Release ^
44+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
45+
-DPYTHON_EXECUTABLE=%PYTHON% ^
46+
-DPython_EXECUTABLE=%PYTHON% ^
47+
-DPython3_EXECUTABLE=%PYTHON% ^
48+
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
49+
-DBUILD_SHARED_LIBS=ON ^
50+
-DBUILD_TESTING=OFF ^
51+
-DCMAKE_OBJECT_PATH_MAX=255 ^
52+
--compile-no-warning-as-error ^
53+
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
54+
^
55+
%SRC_DIR%\%PKG_NAME%\src\work\
56+
if errorlevel 1 exit 1
57+
58+
:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja,
59+
:: see the comment before setting the CMAKE_GENERATOR env variable
60+
cmake --build . --config Release --parallel %CPU_COUNT% --target install
61+
if errorlevel 1 exit 1

0 commit comments

Comments
 (0)