From a0fc3bdd53869d3a409e2a60aa541a2fb4fd7003 Mon Sep 17 00:00:00 2001 From: Armin Hornung Date: Sat, 1 Nov 2025 23:36:56 +0100 Subject: [PATCH] Update GH Actions CI * Add single package builds * Install Qt5 dependencies --- .github/workflows/cmake-linux-single-pkg.yml | 110 +++++++++++++++++++ .github/workflows/cmake-multi-platform.yml | 9 +- 2 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/cmake-linux-single-pkg.yml diff --git a/.github/workflows/cmake-linux-single-pkg.yml b/.github/workflows/cmake-linux-single-pkg.yml new file mode 100644 index 00000000..ec5c5bcc --- /dev/null +++ b/.github/workflows/cmake-linux-single-pkg.yml @@ -0,0 +1,110 @@ + +# Single package (subdirectory) builds of the components, based on CMake starter workflow template +name: Single package builds, CMake multi-platform + +on: + push: + branches: [ "devel", "master" ] + pull_request: + branches: [ "devel", "master" ] + +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..7181b6a1 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -4,9 +4,9 @@ name: CMake on multiple platforms on: push: - branches: [ "devel" ] + branches: [ "devel", "master" ] pull_request: - branches: [ "devel" ] + branches: [ "devel", "master" ] jobs: build: @@ -14,7 +14,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 +48,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.