Skip to content

Topic/workflow#185

Open
agampa263 wants to merge 3 commits intodevelopfrom
topic/workflow
Open

Topic/workflow#185
agampa263 wants to merge 3 commits intodevelopfrom
topic/workflow

Conversation

@agampa263
Copy link

No description provided.

@agampa263 agampa263 requested a review from a team as a code owner January 15, 2026 09:41
Copilot AI review requested due to automatic review settings January 15, 2026 09:41
Copy link

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 pull request refactors the build infrastructure to migrate from a Docker container-based build to a native ubuntu-22.04 GitHub Actions runner. The changes standardize installation paths, improve build organization with out-of-source builds, and update environment variable handling.

Changes:

  • Migrated GitHub Actions workflow from Docker container to native ubuntu-22.04 runner
  • Standardized install prefix to $GITHUB_WORKSPACE/install/usr across all build scripts
  • Converted xdialserver build to CMake-based out-of-source build with Ninja generator
  • Reorganized dependency build script with improved path handling and cleaner structure

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
.github/workflows/native_full_build.yml Removed Docker container configuration and switched to ubuntu-22.04 runner
cov_build.sh Refactored to use CMake/Ninja out-of-source build with environment variables and standardized paths
build_dependencies.sh Restructured with standardized install prefix, added sudo for apt commands, improved organization and path handling

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

Comment on lines +104 to +110
-fpermissive

g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE" \
-fpermissive
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The -fpermissive flag suppresses compilation errors and treats them as warnings. This can hide real issues in the code and should be avoided in production builds. Consider fixing the underlying compilation errors instead of masking them with -fpermissive.

Suggested change
-fpermissive
g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE" \
-fpermissive
-Wall
g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE" \
-Wall

Copilot uses AI. Check for mistakes.
Comment on lines +103 to +110
-I"$STUB_INCLUDE" \
-fpermissive

g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE" \
-fpermissive
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The -fpermissive flag suppresses compilation errors and treats them as warnings. This can hide real issues in the code and should be avoided in production builds. Consider fixing the underlying compilation errors instead of masking them with -fpermissive.

Suggested change
-I"$STUB_INCLUDE" \
-fpermissive
g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE" \
-fpermissive
-I"$STUB_INCLUDE"
g++ -fPIC -shared -o libWPEFrameworkSecurityUtil.so \
securityagent/SecurityTokenUtil.cpp \
-I"$GITHUB_WORKSPACE/stubs" \
-I"$STUB_INCLUDE"

Copilot uses AI. Check for mistakes.

git clone --branch main https://github.com/rdkcentral/entservices-apis.git

git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The GITHUB_TOKEN is exposed to the git clone command on line 40, which could log sensitive credentials in build logs. Consider using a credential helper or other secure method to handle authentication for private repositories.

Suggested change
git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git
set +x
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
set -x
git clone https://github.com/rdkcentral/entservices-testframework.git

Copilot uses AI. Check for mistakes.

apt update
apt install -y ninja-build meson curl libsoup2.4-dev libxml2-dev libglib2.0-dev gobject-introspection libgirepository1.0-dev libgtk-3-dev valac pandoc
pip install jsonref
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The pip install command on line 21 does not use sudo, while the apt commands on lines 14-19 do. This inconsistency may cause the pip package to be installed in the user's local environment instead of system-wide. Consider either using 'sudo pip install' for consistency or using 'pip install --user' to make the local installation explicit.

Suggested change
pip install jsonref
pip install --user jsonref

Copilot uses AI. Check for mistakes.
# Build trevor-base64
if [ ! -d "trower-base64" ]; then
##############################
# Build trower-base64
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The script clones the trower-base64 repository without checking if it already exists. If the script is run multiple times, this will fail. Consider adding a check to skip cloning if the directory already exists, or remove the directory before cloning.

Suggested change
# Build trower-base64
# Build trower-base64
if [ -d "trower-base64" ]; then
rm -rf "trower-base64"
fi

Copilot uses AI. Check for mistakes.
Comment on lines 34 to 41
git clone https://github.com/rdkcentral/iarmbus.git
export IARMBUS_PATH=$GITHUB_WORKSPACE/iarmbus

git clone --branch R4.4.3 https://github.com/rdkcentral/ThunderTools.git
export IARMBUS_PATH="$GITHUB_WORKSPACE/iarmbus"

git clone --branch R4.4.3 https://github.com/rdkcentral/ThunderTools.git
git clone --branch R4.4.1 https://github.com/rdkcentral/Thunder.git

git clone --branch main https://github.com/rdkcentral/entservices-apis.git

git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git

git clone --branch gssdp-1.2.3 https://gitlab.gnome.org/GNOME/gssdp.git
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The git clone commands for repositories on lines 34-41 will fail if these directories already exist from a previous run. With 'set -e' enabled, this will cause the entire script to fail. Consider either removing existing directories before cloning or adding checks to skip cloning if directories exist.

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest
runs-on: ubuntu-22.04
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

Migrating from a Docker container (ghcr.io/rdkcentral/docker-rdk-ci:latest) to ubuntu-22.04 runner changes the build environment significantly. The build_dependencies.sh script now requires sudo access (lines 14-19), which works on GitHub Actions runners but may not work in all environments. Consider documenting this requirement or ensuring the scripts can work both with and without sudo when needed.

Suggested change
runs-on: ubuntu-22.04
runs-on: ubuntu-22.04
container: ghcr.io/rdkcentral/docker-rdk-ci:latest

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +27
-DCMAKE_CXX_FLAGS="\
-I$INSTALL_PREFIX/include/WPEFramework \
-I$INSTALL_PREFIX/include/WPEFramework/core \
-I$INSTALL_PREFIX/include/WPEFramework/plugins \
-I$INSTALL_PREFIX/include/WPEFramework/interfaces" \
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

Using CMAKE_CXX_FLAGS to pass include directories is not the recommended approach. CMake provides CMAKE_CXX_INCLUDES or the target-level include_directories command for this purpose. CMAKE_CXX_FLAGS should be reserved for actual compiler flags (optimization levels, warnings, etc.). Additionally, the multiline format with the backslash continuation after the opening quote will introduce leading whitespace in the flags, which may cause issues with some compilers.

Suggested change
-DCMAKE_CXX_FLAGS="\
-I$INSTALL_PREFIX/include/WPEFramework \
-I$INSTALL_PREFIX/include/WPEFramework/core \
-I$INSTALL_PREFIX/include/WPEFramework/plugins \
-I$INSTALL_PREFIX/include/WPEFramework/interfaces" \
-DCMAKE_CXX_INCLUDES="$INSTALL_PREFIX/include/WPEFramework;$INSTALL_PREFIX/include/WPEFramework/core;$INSTALL_PREFIX/include/WPEFramework/plugins;$INSTALL_PREFIX/include/WPEFramework/interfaces" \

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest
runs-on: ubuntu-22.04
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the same as running container: ubuntu:22.04.
Please see #186

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.

2 participants