Add support for new ubuntu versions #141
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: lpp | |
| on: | |
| pull_request: | |
| branches: | |
| - "master" | |
| push: | |
| branches: | |
| - "master" | |
| jobs: | |
| build: | |
| runs-on: [ self-hosted, linux ] | |
| env: | |
| rosdistro: ${{ matrix.ubuntu == '20.04' && 'noetic' || 'one' }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| gcc: [ '8', '9', '10', '11', '12', '13' ] | |
| cxx: [ '11', '14', '17', '20' ] | |
| ubuntu: [ '20.04', '22.04', '24.04' ] | |
| exclude: | |
| # Exclude GCC 8 on unsupported Ubuntu versions | |
| - gcc: '8' | |
| ubuntu: '22.04' | |
| - gcc: '8' | |
| ubuntu: '24.04' | |
| # Exclude GCC 12 on unsupported Ubuntu version | |
| - gcc: '12' | |
| ubuntu: '20.04' | |
| # Exclude all combinations of Ubuntu 22.04 or 24.04 with CXX 11 or 14 | |
| - ubuntu: '22.04' | |
| cxx: '11' | |
| - ubuntu: '22.04' | |
| cxx: '14' | |
| - ubuntu: '24.04' | |
| cxx: '11' | |
| - ubuntu: '24.04' | |
| cxx: '14' | |
| container: | |
| image: omavteam/ubuntu-omav-ros:ros-ros-base-${{ matrix.ubuntu }} | |
| credentials: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| name: Ubuntu ${{ matrix.ubuntu }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout lpp | |
| with: | |
| repository: ethz-asl/lpp | |
| path: catkin_ws/src/lpp | |
| - name: Switch GCC version | |
| run: | | |
| update-alternatives --set gcc /usr/bin/gcc-${{ matrix.gcc }} | |
| update-alternatives --set g++ /usr/bin/g++-${{ matrix.gcc}} | |
| gcc --version | |
| g++ --version | |
| - name: Build lpp | |
| run: source /opt/ros/${{ env.rosdistro }}/setup.bash && catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DLPP_BUILD_TESTS=1 lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash | |
| working-directory: catkin_ws | |
| shell: bash | |
| - name: Run unittests | |
| run: source /opt/ros/${{ env.rosdistro }}/setup.bash && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash && rosrun lpp test_lpp && rosrun lpp test_glog && rosrun lpp test_lpp_custom && rosrun lpp test_nolog && rosrun lpp test_default && rosrun lpp test_roslog | |
| working-directory: catkin_ws | |
| shell: bash |