diff --git a/.github/workflows/cmake-linux-single-pkg.yml b/.github/workflows/cmake-linux-single-pkg.yml new file mode 100644 index 00000000..3b65e4c0 --- /dev/null +++ b/.github/workflows/cmake-linux-single-pkg.yml @@ -0,0 +1,106 @@ + +# Single package (subdirectory) builds of the components, based on CMake starter workflow template +name: Single package builds, CMake multi-platform + +on: [push, fork, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: true + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # 3. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-latest] + build_type: [Release, Debug] + c_compiler: [gcc, clang] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ + + + steps: + - uses: actions/checkout@v4 + + - name: Install Qt dependencies + run: sudo apt-get -y install libqglviewer-dev-qt5 libqt5opengl5-dev + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "octomap-build-output-dir=${{ github.workspace }}/octomap/build" >> "$GITHUB_OUTPUT" + echo "dynamicEDT3D-build-output-dir=${{ github.workspace }}/dynamicEDT3D/build" >> "$GITHUB_OUTPUT" + echo "octovis-build-output-dir=${{ github.workspace }}/octovis/build" >> "$GITHUB_OUTPUT" + + - name: octomap - Configure CMake + working-directory: octomap + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.octomap-build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }}/octomap + + - name: octomap - Build + working-directory: octomap + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.octomap-build-output-dir }} --config ${{ matrix.build_type }} + + - name: octomap - Test + working-directory: ${{ steps.strings.outputs.octomap-build-output-dir }} + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --build-config ${{ matrix.build_type }} + + - name: dynamicEDT3D - Configure CMake + working-directory: dynamicEDT3D + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.dynamicEDT3D-build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }}/dynamicEDT3D + + - name: dynamicEDT3D - Build + working-directory: dynamicEDT3D + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.dynamicEDT3D-build-output-dir }} --config ${{ matrix.build_type }} + + # No tests available + + - name: octovis - Configure CMake + working-directory: octovis + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.octovis-build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }}/octovis + + - name: octovis - Build + working-directory: octovis + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.octovis-build-output-dir }} --config ${{ matrix.build_type }} + + # No tests available + diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index bfa96492..e98e8406 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,11 +2,7 @@ # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml name: CMake on multiple platforms -on: - push: - branches: [ "devel" ] - pull_request: - branches: [ "devel" ] +on: [push, fork, pull_request] jobs: build: @@ -14,7 +10,7 @@ jobs: strategy: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. - fail-fast: false + fail-fast: true # Set up a matrix to run the following 3 configurations: # 1. @@ -48,6 +44,9 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Install Qt dependencies + run: sudo apt-get -y install libqglviewer-dev-qt5 libqt5opengl5-dev - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index d30465a7..daf4b3f5 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -3,8 +3,12 @@ name: ROS-CI -# This determines when this workflow is run -on: [push, pull_request] # on all pushes and PRs +# This determines when this workflow is run. Long-running ROS CI jobs only on devel and master +on: + push: + branches: [ "devel", "master", "main" ] + pull_request: + branches: [ "devel", "master", "main" ] jobs: CI: @@ -13,7 +17,7 @@ jobs: env: - {ROS_DISTRO: jazzy, PRERELEASE: true} - {ROS_DISTRO: humble, PRERELEASE: true} - #- {ROS_DISTRO: rolling} # 2024-03-12 temporarily deactivate until transitin to Ubuntu Noble is complete + #- {ROS_DISTRO: rolling} # 2024-03-12 temporarily deactivate until transition to Ubuntu Noble is complete env: BUILDER: colcon runs-on: ubuntu-latest diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index a9a05efa..4bf58509 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -24,7 +24,8 @@ set(DYNAMICEDT3D_SOVERSION ) if(NOT TARGET octomap::octomap) - find_package(octomap "${DYNAMICEDT3D_VERSION}" REQUIRED) + find_package(octomap "${DYNAMICEDT3D_VERSION}" REQUIRED + HINTS ${CMAKE_SOURCE_DIR}/../octomap/build) endif() set(DYNAMICEDT3D_FIND_DEPENDENCIES diff --git a/octovis/CMakeLists.txt b/octovis/CMakeLists.txt index 583e126b..d313b4e4 100644 --- a/octovis/CMakeLists.txt +++ b/octovis/CMakeLists.txt @@ -50,7 +50,8 @@ endif() # We need the main octomap library to link against (same version as octovis) if(NOT TARGET octomap::octomap) - find_package(octomap "${OCTOVIS_VERSION}" ${_required}) + find_package(octomap "${OCTOVIS_VERSION}" ${_required} + HINTS ${CMAKE_SOURCE_DIR}/../octomap/build) endif() find_package(OpenGL ${_required}) set(OCTOVIS_FIND_DEPENDENCIES