Skip to content

Enhance CI workflow with OpenCSD decoder build steps#9

Merged
vinodappu merged 8 commits intomasterfrom
ci-cd-integration
Nov 26, 2025
Merged

Enhance CI workflow with OpenCSD decoder build steps#9
vinodappu merged 8 commits intomasterfrom
ci-cd-integration

Conversation

@vinodappu
Copy link
Copy Markdown

Added steps to build OpenCSD decoder and prepare artifacts.

vinodappu and others added 5 commits October 21, 2025 14:27
Added steps to build OpenCSD decoder and prepare artifacts.
Commented out the copy command for CoreSight configuration file.
Added workflow_dispatch to allow manual/API triggers and updated artifact preparation steps.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a GitHub Actions CI workflow to automate the build process for the OpenCSD decoder library. The workflow is triggered on pushes and pull requests to the master branch, as well as manual/API triggers via workflow_dispatch. It builds the OpenCSD libraries and prepares them as artifacts for download.

Key Changes:

  • Adds automated build for OpenCSD decoder libraries using the existing Linux makefile
  • Prepares and uploads build artifacts for distribution
  • Enables manual workflow triggering for external integrations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +51 to +54
# Copy the built library
cp "$GITHUB_WORKSPACE/decoder/lib/builddir/libopencsd.so" \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/libopencsd.so"

Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build creates versioned shared libraries (e.g., libopencsd.so.X.Y.Z and symlinks) along with static libraries (.a files), but the workflow only copies the base .so file. This could cause issues for proper library versioning and linking.

Consider using a wildcard or copying the entire directory to preserve all library variants and symlinks:

cp -d "$GITHUB_WORKSPACE/decoder/lib/builddir"/lib*.so* \
   "$GITHUB_WORKSPACE/artifacts/OpenCSD/"
cp "$GITHUB_WORKSPACE/decoder/lib/builddir"/lib*.a \
   "$GITHUB_WORKSPACE/artifacts/OpenCSD/" 2>/dev/null || true

The -d flag preserves symlinks, which is important for versioned shared libraries.

Suggested change
# Copy the built library
cp "$GITHUB_WORKSPACE/decoder/lib/builddir/libopencsd.so" \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/libopencsd.so"
# Copy all built shared and static libraries, preserving symlinks
cp -d "$GITHUB_WORKSPACE/decoder/lib/builddir"/lib*.so* \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/"
cp "$GITHUB_WORKSPACE/decoder/lib/builddir"/lib*.a \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/" 2>/dev/null || true

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/c-cpp.yml Outdated
Comment on lines +19 to +33
run: |
echo "Current directory:"
pwd
echo "Directory contents:"
ls -la
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"

# Navigate directly to decoder build directory
cd "$GITHUB_WORKSPACE/decoder/build/linux"
echo "Changed to decoder build directory:"
pwd

# Clean and build libraries
make -f makefile clean
make -f makefile libs
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build commands don't explicitly check for build failures. If make libs fails, the workflow will continue to the artifact preparation step, which could lead to confusing errors.

While GitHub Actions will automatically fail the step if the command exits with a non-zero status, it's better to be explicit. Consider adding error checking or using set -e to stop on any error:

run: |
  set -e  # Exit on any error
  cd "$GITHUB_WORKSPACE/decoder/build/linux"
  make libs

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/c-cpp.yml Outdated
# Copy the built library
cp "$GITHUB_WORKSPACE/decoder/lib/builddir/libopencsd.so" \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/libopencsd.so"

Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The artifacts only include the compiled libraries but not the header files required to use them. Consumers of these libraries will need the headers from decoder/include/ to compile against the library.

Consider adding header files to the artifacts:

# Copy headers
cp -r "$GITHUB_WORKSPACE/decoder/include" \
   "$GITHUB_WORKSPACE/artifacts/OpenCSD/"
Suggested change
# Copy headers
cp -r "$GITHUB_WORKSPACE/decoder/include" \
"$GITHUB_WORKSPACE/artifacts/OpenCSD/"

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/c-cpp.yml Outdated
Comment thread .github/workflows/c-cpp.yml Outdated
promodkumar-ashling and others added 3 commits November 26, 2025 15:39
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vinodappu vinodappu merged commit 15073a3 into master Nov 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants