Use custom docker container to decrease build time #131
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 ] | |
strategy: | |
fail-fast: false | |
matrix: | |
rosdistro: [ 'noetic' ] | |
gcc: [ '8', '9', '10', '11', '13' ] | |
cxx: [ '11', '14', '17', '20' ] | |
container: | |
image: omavteam/ubuntu-omav-ros:ros-noetic-ros-base | |
credentials: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }} | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout lpp | |
with: | |
repository: ethz-asl/lpp | |
token: ${{ secrets.PAT }} | |
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/${{ matrix.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/${{ matrix.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 |