Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 27 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,26 @@ jobs:
run: |
VERSION=${GITHUB_REF#refs/tags/v}
PKG_NAME="cddsctl-${VERSION}-linux-x86_64"
BIN=build/cli/cddsctl
# Split debug info: ship a stripped bin, keep symbols separately.
objcopy --only-keep-debug "$BIN" cddsctl.debug
objcopy --strip-debug --strip-unneeded "$BIN"
objcopy --add-gnu-debuglink=cddsctl.debug "$BIN"
mkdir -p ${PKG_NAME}/bin
cp build/cli/cddsctl ${PKG_NAME}/bin/
cp "$BIN" ${PKG_NAME}/bin/
tar -czvf ${PKG_NAME}.tar.gz ${PKG_NAME}
mkdir -p ${PKG_NAME}-debug
cp cddsctl.debug ${PKG_NAME}-debug/
tar -czvf ${PKG_NAME}.debug.tar.gz ${PKG_NAME}-debug
echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: ${{ env.PKG_NAME }}.tar.gz
path: |
${{ env.PKG_NAME }}.tar.gz
${{ env.PKG_NAME }}.debug.tar.gz

build-aarch64:
name: Build Release (aarch64)
Expand Down Expand Up @@ -86,16 +96,26 @@ jobs:
run: |
VERSION=${GITHUB_REF#refs/tags/v}
PKG_NAME="cddsctl-${VERSION}-linux-aarch64"
BIN=build/cli/cddsctl
# Split debug info: ship a stripped bin, keep symbols separately.
objcopy --only-keep-debug "$BIN" cddsctl.debug
objcopy --strip-debug --strip-unneeded "$BIN"
objcopy --add-gnu-debuglink=cddsctl.debug "$BIN"
mkdir -p ${PKG_NAME}/bin
cp build/cli/cddsctl ${PKG_NAME}/bin/
cp "$BIN" ${PKG_NAME}/bin/
tar -czvf ${PKG_NAME}.tar.gz ${PKG_NAME}
mkdir -p ${PKG_NAME}-debug
cp cddsctl.debug ${PKG_NAME}-debug/
tar -czvf ${PKG_NAME}.debug.tar.gz ${PKG_NAME}-debug
echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: ${{ env.PKG_NAME }}.tar.gz
path: |
${{ env.PKG_NAME }}.tar.gz
${{ env.PKG_NAME }}.debug.tar.gz

release:
name: Create Release
Expand Down Expand Up @@ -158,7 +178,9 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.tar.gz
files: |
artifacts/*.tar.gz
!artifacts/*.debug.tar.gz
body_path: RELEASE_NOTES.md
name: cddsctl ${{ github.ref_name }}
env:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@
# Build directory
build/

# 3rd_party generated directories
# 3rd_party generated directories (build trees + per-arch install prefixes)
3rd_party/yaml-cpp/
3rd_party/yaml-cpp-*/
3rd_party/iceoryx/
3rd_party/iceoryx-*/
3rd_party/cyclonedds-*/
3rd_party/build/

Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ message(STATUS "Target architecture: ${TARGET_ARCH_NAME}")
# Debug symbols for all build types
add_compile_options(-g)

# Let the linker drop unreferenced code from the statically-linked DDS stack
# (iceoryx/CycloneDDS), of which cddsctl uses only a fraction.
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_compile_options($<$<CONFIG:Release>:-Os>)

# Use GNUInstallDirs for standard install paths
include(GNUInstallDirs)

Expand Down
Loading