Ubuntu [Focal, Jammy, Noble] #194
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: Ubuntu [Focal, Jammy, Noble] | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
release: | |
types: | |
- released | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
ci: | |
name: ${{ matrix.distro }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: [focal, jammy, noble] | |
container: | |
image: ubuntu:${{ matrix.distro }} | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/${{ matrix.distro }}/.ccache | |
DEBIAN_FRONTEND: noninteractive | |
TZ: Etc/UTC | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: target_ws/src | |
- name: Set build type to Release | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
run: | | |
echo "BUILD_TYPE=Release" >> $GITHUB_ENV | |
- name: Build and Tests | |
uses: tesseract-robotics/colcon-action@v11 | |
with: | |
before-script: 'apt install -y -qq clang-tidy lcov' | |
ccache-prefix: ${{ matrix.distro }} | |
add-ros-ppa: true | |
vcs-file: dependencies.repos | |
target-path: target_ws/src | |
target-args: --cmake-args -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_TESTING=ON -DENABLE_CLANG_TIDY=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_CPACK=ON | |
- name: CodeCov | |
if: matrix.distro == 'jammy' | |
working-directory: target_ws | |
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@v4 | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
with: | |
name: debian_package | |
path: ${{ github.workspace }}/artifacts/*.deb | |
- uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name == 'release' && github.event.action == 'released' }} | |
with: | |
name: archive_package | |
path: ${{ github.workspace }}/artifacts/*.tar.xz |