diff --git a/.github/workflows/cmake-multi-platform-build.yml b/.github/workflows/cmake-multi-platform-build.yml new file mode 100644 index 000000000..11595bbfe --- /dev/null +++ b/.github/workflows/cmake-multi-platform-build.yml @@ -0,0 +1,74 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: + - 'develop' + pull_request: + branches: + - 'develop' + workflow_dispatch: + branches: + - '*' + +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: false + + # Set up a matrix to run the following 3 linux versions: + matrix: + os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] + build_type: [Release] + c_compiler: [gcc] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + + - os: ubuntu-24.04 + c_compiler: gcc + cpp_compiler: g++ + + - os: ubuntu-22.04 + c_compiler: gcc + cpp_compiler: g++ + + - os: ubuntu-20.04 + c_compiler: gcc + cpp_compiler: g++ + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies + run: > + sudo apt update && sudo apt install -y libboost-all-dev build-essential cmake cmake-curses-gui libflann-dev libgsl-dev libeigen3-dev libopenmpi-dev openmpi-bin opencl-c-headers ocl-icd-opencl-dev freeglut3-dev libhdf5-dev liblz4-dev libopencv-dev libyaml-cpp-dev libcgal-dev libgdal-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 "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + # 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.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }} + + - name: Build + # 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.build-output-dir }} --config ${{ matrix.build_type }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c3ba767a4..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - industrial_ci: - strategy: - matrix: - env: - - {ROS_DISTRO: melodic, ROS_REPO: testing} - - {ROS_DISTRO: melodic, ROS_REPO: main} - - {ROS_DISTRO: noetic, ROS_REPO: testing} - - {ROS_DISTRO: noetic, ROS_REPO: main} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} diff --git a/.github/workflows/ros-humble.yml b/.github/workflows/ros-humble.yml new file mode 100644 index 000000000..2f974e4fb --- /dev/null +++ b/.github/workflows/ros-humble.yml @@ -0,0 +1,31 @@ +name: humble +on: + push: + branches: + - 'develop' + - 'humble' + pull_request: + branches: + - 'develop' + - 'humble' + workflow_dispatch: + branches: + - '*' +jobs: + ros_humble: + name: humble + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + steps: + - name: Checkout LVR2 + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Compile LVR2 in ROS 2 humble WS + uses: 'ros-industrial/industrial_ci@master' + env: + ROS_DISTRO: humble + ROS_REPO: main + AFTER_SCRIPT: cd ~/target_ws && ./build/lvr2/bin/lvr2_reconstruct src/lvr2/dat/scan.pts \ No newline at end of file diff --git a/.github/workflows/ros-iron.yml b/.github/workflows/ros-iron.yml new file mode 100644 index 000000000..c5df78b95 --- /dev/null +++ b/.github/workflows/ros-iron.yml @@ -0,0 +1,31 @@ +name: iron +on: + push: + branches: + - 'develop' + - 'iron' + pull_request: + branches: + - 'develop' + - 'iron' + workflow_dispatch: + branches: + - '*' +jobs: + ros_iron: + name: iron + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + steps: + - name: Checkout LVR2 + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Compile LVR2 in ROS 2 iron WS + uses: 'ros-industrial/industrial_ci@master' + env: + ROS_DISTRO: iron + ROS_REPO: main + AFTER_SCRIPT: cd ~/target_ws && ./build/lvr2/bin/lvr2_reconstruct src/lvr2/dat/scan.pts \ No newline at end of file diff --git a/.github/workflows/ros-jazzy.yml b/.github/workflows/ros-jazzy.yml new file mode 100644 index 000000000..c4ecb28f2 --- /dev/null +++ b/.github/workflows/ros-jazzy.yml @@ -0,0 +1,31 @@ +name: jazzy +on: + push: + branches: + - 'develop' + - 'jazzy' + pull_request: + branches: + - 'develop' + - 'jazzy' + workflow_dispatch: + branches: + - '*' +jobs: + ros_jazzy: + name: jazzy + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + steps: + - name: Checkout LVR2 + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Compile LVR2 in ROS 2 jazzy WS + uses: 'ros-industrial/industrial_ci@master' + env: + ROS_DISTRO: jazzy + ROS_REPO: main + AFTER_SCRIPT: cd ~/target_ws && ./build/lvr2/bin/lvr2_reconstruct src/lvr2/dat/scan.pts \ No newline at end of file diff --git a/.github/workflows/ros-noetic.yml b/.github/workflows/ros-noetic.yml new file mode 100644 index 000000000..6b8dca717 --- /dev/null +++ b/.github/workflows/ros-noetic.yml @@ -0,0 +1,31 @@ +name: noetic +on: + push: + branches: + - 'develop' + - 'noetic' + pull_request: + branches: + - 'develop' + - 'noetic' + workflow_dispatch: + branches: + - '*' +jobs: + ros_noetic: + name: noetic + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + steps: + - name: Checkout LVR2 + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Compile LVR2 in ROS2 1 noetic WS + uses: 'ros-industrial/industrial_ci@master' + env: + ROS_DISTRO: noetic + ROS_REPO: main + AFTER_SCRIPT: cd ~/target_ws && ./build/lvr2/bin/lvr2_reconstruct src/lvr2/dat/scan.pts \ No newline at end of file