diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 0838903..029907e 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 1200 strategy: matrix: - platformArch: [macOS] # iOS, iOS_Simulator, iOS_Simulator_M1, macCatalyst, macCatalyst_M1 + platformArch: [macOS, iOS, iOS_Simulator, iOS_Simulator_M1, macCatalyst, macCatalyst_M1] steps: # https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#viewing-all-properties-of-an-event # https://docs.github.com/en/actions/learn-github-actions/contexts#github-context @@ -34,14 +34,26 @@ jobs: cmake-version: '3.23.x' - name: Fetch cached Python environment - run: curl -OL https://github.com/light-tech/ROS2-On-iOS/releases/download/humble-1.3/python_venv.tar.xz && tar xzf python_venv.tar.xz + run: curl -OL https://github.com/light-tech/ROS2-On-iOS/releases/download/humble-1.3/python_venv.tar.xz + + - name: Fetch prebuilt dependencies + run: curl -OL https://github.com/light-tech/ROS2-On-iOS/releases/download/humble-1.3/deps_${{ matrix.platformArch }}.tar.xz + if: ${{ matrix.platformArch == 'macOS' }} + + - name: Extract artifacts + run: ./extract_artifacts.sh - name: Build ROS2 id: build_ros2 run: source ros2PythonEnv/bin/activate && source build_ros2.sh ${{ matrix.platformArch }} && buildRos2Base + - name: Archive ROS2 and dependencies + run: tar cJf ros2_${{ matrix.platformArch }}.tar.xz ros2_${{ matrix.platformArch }}/base/ + if: ${{ matrix.platformArch == 'macOS' }} + - name: Archive ROS2 and dependencies run: tar cJf ros2_${{ matrix.platformArch }}.tar.xz ros2_${{ matrix.platformArch }}/ + if: ${{ matrix.platformArch != 'macOS' }} - name: Publish ROS2 for release uses: actions/upload-artifact@v3 diff --git a/build_ros2.sh b/build_ros2.sh index bb0ee7d..30166ae 100755 --- a/build_ros2.sh +++ b/build_ros2.sh @@ -44,6 +44,7 @@ printPython() { } buildRos2Base() { + ros2SystemDependenciesPath=$scriptDir/ros2_$targetPlatform/deps echo "Build ros2 base ( assuming dependencies are available at $ros2SystemDependenciesPath )" # printPython @@ -68,9 +69,9 @@ buildRos2Base() { fi colconArgs+=(--cmake-args -DBUILD_TESTING=NO \ + -DFORCE_BUILD_VENDOR_PKG=OFF \ -DTHIRDPARTY=FORCE \ -DCOMPILE_TOOLS=NO \ - -DFORCE_BUILD_VENDOR_PKG=ON \ -DBUILD_MEMORY_TOOLS=OFF \ -DRCL_LOGGING_IMPLEMENTATION=rcl_logging_noop) @@ -82,14 +83,6 @@ buildRos2Base() { # as there is no way to link with the ARM version of libpython*.dylib there # and rclpy and IDL code generation for Python needs that. vcs import src < $scriptDir/ros2_cli.repos - - # Update pybind11 to v2.10.1 - local pbcml=src/ros2/pybind11_vendor/CMakeLists.txt - sed -i.bak 's/GIT_TAG .*/GIT_TAG 80dc998efced8ceb2be59756668a7e90e8bef917/g' $pbcml - sed -i.bak 's/PATCH_COMMAND//g' $pbcml - sed -i.bak 's/.* git apply -p1 .*//g' $pbcml - sed -i.bak 's/.*pybind11-2.9.1-fix-windows-debug.patch.*//g' $pbcml - # cat $pbcml fi colconArgs+=(-DCMAKE_PREFIX_PATH=$ros2SystemDependenciesPath)