Skip to content

Commit e2891d1

Browse files
Add back cpack build to ubuntu.yml
1 parent 0c03320 commit e2891d1

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/ubuntu.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
types:
1313
- released
1414

15+
env:
16+
BUILD_TYPE: Debug
17+
1518
jobs:
1619
ci:
1720
name: ${{ matrix.distro }}
@@ -32,6 +35,11 @@ jobs:
3235
with:
3336
path: target_ws/src
3437

38+
- name: Set build type to Release
39+
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
40+
run: |
41+
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
42+
3543
- name: Build and Tests
3644
uses: tesseract-robotics/colcon-action@v11
3745
with:
@@ -40,12 +48,33 @@ jobs:
4048
add-ros-ppa: true
4149
vcs-file: dependencies.repos
4250
target-path: target_ws/src
43-
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DENABLE_CLANG_TIDY=ON -DENABLE_CODE_COVERAGE=ON
51+
target-args: --cmake-args -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_TESTING=ON -DENABLE_CLANG_TIDY=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_CPACK=ON
4452

4553
- name: CodeCov
4654
if: matrix.distro == 'noble'
4755
working-directory: target_ws
56+
shell: bash
4857
run: |
4958
source install/setup.bash
5059
make -C ./build/boost_plugin_loader ccov-all
5160
bash <(curl -s https://codecov.io/bash) -t ec6ee46b-1f52-482c-82ef-1aaabc673f8d -s ./build/boost_plugin_loader -f *all-merged.info
61+
62+
- name: Package
63+
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
64+
working-directory: workspace/build/boost_plugin_loader
65+
run: |
66+
cpack --config CPackConfig.cmake
67+
cp ./*.deb ${{ github.workspace }}/artifacts
68+
cp ./*.tar.xz ${{ github.workspace }}/artifacts
69+
70+
- uses: actions/upload-artifact@v4
71+
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
72+
with:
73+
name: debian_package
74+
path: ${{ github.workspace }}/artifacts/*.deb
75+
76+
- uses: actions/upload-artifact@v4
77+
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
78+
with:
79+
name: archive_package
80+
path: ${{ github.workspace }}/artifacts/*.tar.xz

0 commit comments

Comments
 (0)