11name : Coverage report
22on :
3+ pull_request :
4+ branches :
5+ - " master"
36 push :
47 branches :
58 - " master"
1720 rosdistro : ['noetic']
1821 gcc : ['10']
1922 cxx : ['17']
20- container : ros:${{ matrix.rosdistro }}-ros-base-focal
23+ container :
24+ image : omavteam/ubuntu-omav-ros:ros-noetic-ros-base
25+ credentials :
26+ username : ${{ secrets.DOCKER_USERNAME }}
27+ password : ${{ secrets.DOCKER_PASSWORD }}
2128 permissions :
2229 pages : write # to deploy to Pages
2330 id-token : write # to verify the deployment originates from an appropriate source
@@ -29,23 +36,11 @@ jobs:
2936 token : ${{ secrets.PAT }}
3037 path : catkin_ws/src/lpp
3138
32- - name : Install newest git version
33- run : sudo apt update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git
34-
35- - name : Install GCC version ${{ matrix.gcc }}
36- run : sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }}
37-
38- - name : Install catkin tools
39- run : sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools
40-
41- - name : Install system dependencies
42- run : sudo apt install -y libgoogle-glog-dev
43-
4439 - name : Install gcovr
4540 run : sudo apt install -y gcovr
4641
4742 - name : Build lpp
48- run : source /opt/ros/${{ matrix.rosdistro }}/setup.bash && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE="Debug" -DENABLE_COVERAGE=1 -DLPP_BUILD_TESTS=1 && make
43+ run : source /opt/ros/${{ matrix.rosdistro }}/setup.bash && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE="Debug" -DENABLE_COVERAGE=1 -DLPP_BUILD_TESTS=1
4944 working-directory : catkin_ws/src/lpp
5045 shell : bash
5146
@@ -58,14 +53,20 @@ jobs:
5853 run : make coverage
5954 working-directory : catkin_ws/src/lpp/build
6055
56+ - name : Print coverage
57+ run : gcovr
58+ working-directory : catkin_ws/src/lpp
59+
6160 - name : Upload artifact
6261 uses : actions/upload-pages-artifact@v3
6362 with :
6463 path : ./catkin_ws/src/lpp/build/coverage
64+ if : ${{ github.ref == 'refs/heads/master' }}
6565
6666 - name : Deploy to Github pages
6767 uses : actions/deploy-pages@v4
6868 id : deployment
69+ if : ${{ github.ref == 'refs/heads/master' }}
6970
7071
7172
0 commit comments