Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debian cpack pipeline #100

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 28 additions & 22 deletions .github/workflows/package_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,55 @@ on:

jobs:
Debian:
name: Ubuntu Focal
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
container: ubuntu:20.04
container:
image: ubuntu:${{ matrix.distro }}
env:
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
distro: [focal, jammy, noble]
steps:
- uses: actions/checkout@v4
with:
path: workspace/src/ros_industrial_cmake_boilerplate

- name: Create artifacts directory
run: |
mkdir -p ${{ github.workspace }}/artifacts
path: target_ws/src

- name: Install dependencies
working-directory: workspace
run: |
export DEBIAN_FRONTEND=noninteractive
apt update -q
apt install -q -y clang-tidy python3 python3-pip
pip3 install -q --upgrade pip
pip3 install -q colcon-common-extensions rosdep vcstool
rosdep init -q
rosdep update -q
rosdep install --from-paths src --ignore-src -r -y -q
apt install -q -y clang-tidy

- name: Build
working-directory: workspace
uses: tesseract-robotics/colcon-action@v9
with:
ccache-enabled: false
add-ros-ppa: true
rosdep-enabled: false
target-path: target_ws/src
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Release -DRICB_PACKAGE=ON
run-tests: false

- name: Create artifacts directory
run: |
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release -DRICB_PACKAGE=ON
if [ $? -ne 0 ]; then exit 1; fi
mkdir -p $GITHUB_WORKSPACE/artifacts

- name: Package
working-directory: workspace/build/ros_industrial_cmake_boilerplate
working-directory: target_ws/build/ros_industrial_cmake_boilerplate
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb ${{ github.workspace }}/artifacts
cp ./*.tar.xz ${{ github.workspace }}/artifacts
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts

- uses: actions/upload-artifact@v4
with:
name: debian_package
name: debian_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.deb

- uses: actions/upload-artifact@v4
with:
name: archive_package
name: archive_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.tar.xz