Ubuntu-Focal #288
This file contains 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: Ubuntu-Focal | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
schedule: | |
- cron: '0 5 * * *' | |
# allow manually starting this workflow | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
ci: | |
name: Ubuntu-Focal | |
runs-on: ubuntu-20.04 | |
container: ubuntu:20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: workspace/src/boost_plugin_loader | |
- name: Install dependencies | |
working-directory: workspace | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
apt update -q | |
apt install -q -y clang-tidy python3 python3-pip git curl | |
pip3 install -q --upgrade pip | |
pip3 install -q colcon-common-extensions rosdep vcstool | |
rosdep init -q | |
rosdep update -q | |
vcs import src < src/boost_plugin_loader/dependencies.repos | |
rosdep install --from-paths src --ignore-src -r -y -q | |
- name: Set build type to Release | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
run: | | |
echo "BUILD_TYPE=Release" >> $GITHUB_ENV | |
- name: Build | |
working-directory: workspace | |
run: | | |
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_TESTING=ON -DENABLE_CLANG_TIDY=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_CPACK=ON | |
if [ $? -ne 0 ]; then exit 1; fi | |
- name: Test | |
working-directory: workspace | |
run: | | |
colcon test --event-handlers console_direct+ --return-code-on-test-failure | |
colcon test-result | |
- name: CodeCov | |
working-directory: workspace | |
shell: bash | |
run: | | |
source install/setup.bash | |
make -C ./build/boost_plugin_loader ccov-all | |
bash <(curl -s https://codecov.io/bash) -t ec6ee46b-1f52-482c-82ef-1aaabc673f8d -s ./build/boost_plugin_loader -f *all-merged.info | |
- name: Package | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
working-directory: workspace/build/boost_plugin_loader | |
run: | | |
cpack --config CPackConfig.cmake | |
cp ./*.deb ${{ github.workspace }}/artifacts | |
cp ./*.tar.xz ${{ github.workspace }}/artifacts | |
- uses: actions/upload-artifact@v2 | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
with: | |
name: debian_package | |
path: ${{ github.workspace }}/artifacts/*.deb | |
- uses: actions/upload-artifact@v2 | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
with: | |
name: archive_package | |
path: ${{ github.workspace }}/artifacts/*.tar.xz |