-
Notifications
You must be signed in to change notification settings - Fork 25
Topic/workflow #185
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
base: develop
Are you sure you want to change the base?
Topic/workflow #185
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,7 @@ on: | |
| jobs: | ||
| build-entservices-on-pr: | ||
| name: Build xdialserver component in github rdkcentral | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | ||
| runs-on: ubuntu-22.04 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the same as running container: ubuntu:22.04. |
||
|
|
||
| steps: | ||
| - name: Checkout code | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,130 +1,118 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ############################## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Paths | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_WORKSPACE="${PWD}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd ${GITHUB_WORKSPACE} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p "$INSTALL_PREFIX" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # # ############################# | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #1. Install Dependencies and packages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ############################## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # System dependencies (sudo REQUIRED in GitHub Actions) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt install -y \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ninja-build meson cmake curl libcurl4-openssl-dev \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| libsoup2.4-dev libxml2-dev libglib2.0-dev \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gobject-introspection libgirepository1.0-dev \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| libgtk-3-dev libcunit1-dev valac pandoc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install jsonref | |
| pip install --user jsonref |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| # Build trower-base64 | |
| # Build trower-base64 | |
| if [ -d "trower-base64" ]; then | |
| rm -rf "trower-base64" | |
| fi |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| 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
AI
Jan 15, 2026
There was a problem hiding this comment.
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
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| -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
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| -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" |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,16 +1,33 @@ | ||||||||||||||
| #!/bin/bash | ||||||||||||||
| set -x | ||||||||||||||
| set -e | ||||||||||||||
| set -x | ||||||||||||||
|
|
||||||||||||||
| ############################## | ||||||||||||||
| # Paths | ||||||||||||||
| GITHUB_WORKSPACE="${PWD}" | ||||||||||||||
| ls -la ${GITHUB_WORKSPACE} | ||||||||||||||
| ############################ | ||||||||||||||
| # Build xdialserver | ||||||||||||||
| echo "buliding xdialserver" | ||||||||||||||
| INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" | ||||||||||||||
|
|
||||||||||||||
| cd ${GITHUB_WORKSPACE} | ||||||||||||||
| ############################## | ||||||||||||||
| # Environment | ||||||||||||||
| export CMAKE_PREFIX_PATH="$INSTALL_PREFIX" | ||||||||||||||
| export PKG_CONFIG_PATH="$INSTALL_PREFIX/lib/pkgconfig:$INSTALL_PREFIX/lib/x86_64-linux-gnu/pkgconfig" | ||||||||||||||
| export LD_LIBRARY_PATH="$INSTALL_PREFIX/lib:$INSTALL_PREFIX/lib/x86_64-linux-gnu" | ||||||||||||||
|
|
||||||||||||||
| make | ||||||||||||||
| ############################## | ||||||||||||||
| # Build xdialserver (out-of-source) | ||||||||||||||
| cmake -G Ninja \ | ||||||||||||||
| -S "$GITHUB_WORKSPACE/server" \ | ||||||||||||||
| -B build/xdialserver \ | ||||||||||||||
| -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \ | ||||||||||||||
| -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" \ | ||||||||||||||
| -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" \ | ||||||||||||||
|
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" \ | |
| -DCMAKE_CXX_INCLUDES="$INSTALL_PREFIX/include/WPEFramework;$INSTALL_PREFIX/include/WPEFramework/core;$INSTALL_PREFIX/include/WPEFramework/plugins;$INSTALL_PREFIX/include/WPEFramework/interfaces" \ |
There was a problem hiding this comment.
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.