|
| 1 | + |
| 2 | +# Single package (subdirectory) builds of the components, based on CMake starter workflow template |
| 3 | +name: Single package builds Linux |
| 4 | + |
| 5 | +on: [push, fork, pull_request] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + |
| 11 | + strategy: |
| 12 | + # 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. |
| 13 | + fail-fast: true |
| 14 | + |
| 15 | + matrix: |
| 16 | + os: [ubuntu-latest] |
| 17 | + build_type: [Release, Debug] |
| 18 | + c_compiler: [gcc, clang] |
| 19 | + include: |
| 20 | + - os: ubuntu-latest |
| 21 | + c_compiler: gcc |
| 22 | + cpp_compiler: g++ |
| 23 | + - os: ubuntu-latest |
| 24 | + c_compiler: clang |
| 25 | + cpp_compiler: clang++ |
| 26 | + |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + - name: Install Qt dependencies |
| 32 | + run: sudo apt-get -y install libqglviewer-dev-qt5 libqt5opengl5-dev |
| 33 | + |
| 34 | + - name: Set reusable strings |
| 35 | + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. |
| 36 | + id: strings |
| 37 | + shell: bash |
| 38 | + run: | |
| 39 | + echo "octomap-build-output-dir=${{ github.workspace }}/octomap/build" >> "$GITHUB_OUTPUT" |
| 40 | + echo "dynamicEDT3D-build-output-dir=${{ github.workspace }}/dynamicEDT3D/build" >> "$GITHUB_OUTPUT" |
| 41 | + echo "octovis-build-output-dir=${{ github.workspace }}/octovis/build" >> "$GITHUB_OUTPUT" |
| 42 | + echo "common-install-dir=${{ github.workspace }}/install" >> "$GITHUB_OUTPUT" |
| 43 | +
|
| 44 | + - name: octomap - Configure CMake |
| 45 | + working-directory: octomap |
| 46 | + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
| 47 | + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
| 48 | + run: > |
| 49 | + cmake -B ${{ steps.strings.outputs.octomap-build-output-dir }} |
| 50 | + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} |
| 51 | + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} |
| 52 | + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} |
| 53 | + -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.common-install-dir }} |
| 54 | + -S ${{ github.workspace }}/octomap |
| 55 | +
|
| 56 | + - name: octomap - Build |
| 57 | + working-directory: octomap |
| 58 | + # 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). |
| 59 | + run: cmake --build ${{ steps.strings.outputs.octomap-build-output-dir }} --config ${{ matrix.build_type }} |
| 60 | + |
| 61 | + - name: octomap - Test |
| 62 | + working-directory: ${{ steps.strings.outputs.octomap-build-output-dir }} |
| 63 | + # 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). |
| 64 | + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail |
| 65 | + run: ctest --build-config ${{ matrix.build_type }} |
| 66 | + |
| 67 | + - name: octomap - Install |
| 68 | + run: | |
| 69 | + export CMAKE_PREFIX_PATH=${{ steps.strings.outputs.common-install-dir }} |
| 70 | + cmake --install ${{ steps.strings.outputs.octomap-build-output-dir }} --config ${{ matrix.build_type }} |
| 71 | + |
| 72 | + |
| 73 | + - name: dynamicEDT3D - Configure CMake |
| 74 | + working-directory: dynamicEDT3D |
| 75 | + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
| 76 | + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
| 77 | + run: | |
| 78 | + export CMAKE_PREFIX_PATH=${{ steps.strings.outputs.common-install-dir }} |
| 79 | + 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 |
| 80 | +
|
| 81 | + - name: dynamicEDT3D - Build |
| 82 | + working-directory: dynamicEDT3D |
| 83 | + # 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). |
| 84 | + run: | |
| 85 | + echo $CMAKE_PREFIX_PATH |
| 86 | + cmake --build ${{ steps.strings.outputs.dynamicEDT3D-build-output-dir }} --config ${{ matrix.build_type }} |
| 87 | + |
| 88 | + # No tests available |
| 89 | + |
| 90 | + - name: octovis - Configure CMake |
| 91 | + working-directory: octovis |
| 92 | + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
| 93 | + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
| 94 | + run: | |
| 95 | + export CMAKE_PREFIX_PATH=${{ steps.strings.outputs.common-install-dir }} |
| 96 | + 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 |
| 97 | +
|
| 98 | + - name: octovis - Build |
| 99 | + working-directory: octovis |
| 100 | + # 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). |
| 101 | + run: cmake --build ${{ steps.strings.outputs.octovis-build-output-dir }} --config ${{ matrix.build_type }} |
| 102 | + |
| 103 | + # No tests available |
| 104 | + |
0 commit comments