From 1e59db5c56d7b87107544d1232c81abf94a36bc8 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Fri, 15 May 2026 09:24:29 +0200 Subject: [PATCH 1/3] Update workflow for ThunderInterfaces build on Linux --- .../Build ThunderInterfaces on Linux.yml | 78 +++---------------- 1 file changed, 11 insertions(+), 67 deletions(-) diff --git a/.github/workflows/Build ThunderInterfaces on Linux.yml b/.github/workflows/Build ThunderInterfaces on Linux.yml index bf60c26d..c31a17b7 100644 --- a/.github/workflows/Build ThunderInterfaces on Linux.yml +++ b/.github/workflows/Build ThunderInterfaces on Linux.yml @@ -1,75 +1,19 @@ -name: Build ThunderInterfaces on Linux +name: Build ThunderInterfaces on Linux (R4_4) + +permissions: + contents: read on: + workflow_dispatch: push: - branches: ["master"] + branches: ["development/actions-r4_4"] # TO-DO: change to R4_4 when development is over pull_request: - branches: ["master"] - workflow_call: - + branches: ["R4_4"] + jobs: Thunder: - uses: rdkcentral/Thunder/.github/workflows/Build Thunder on Linux.yml@master - + uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@development/actions-r4_4 # TO-DO: change to R4_4 when development is over + ThunderInterfaces: needs: Thunder - - runs-on: ubuntu-latest - - strategy: - matrix: - build_type: [Debug, Release, MinSizeRel] - - name: Build type - ${{matrix.build_type}} - steps: - - name: Install necessary packages - uses: nick-fields/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 10 - command: | - sudo gem install apt-spy2 - sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt install python3-pip - pip install jsonref - sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev - - - name: Checkout Thunder - uses: actions/checkout@v3 - with: - path: Thunder - repository: rdkcentral/Thunder - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: Thunder-${{matrix.build_type}}-artifact - path: ${{matrix.build_type}} - - - name: Unpack files - run: | - tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz - rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz - - - name: Checkout ThunderInterfaces - uses: actions/checkout@v3 - with: - path: ThunderInterfaces - repository: rdkcentral/ThunderInterfaces - - - name: Build ThunderInterfaces - run: | - cmake -G Ninja -S ThunderInterfaces -B ${{matrix.build_type}}/build/ThunderInterfaces \ - -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ - -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" - cmake --build ${{matrix.build_type}}/build/ThunderInterfaces --target install - - - name: Tar files - run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}} - - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: ThunderInterfaces-${{matrix.build_type}}-artifact - path: ${{matrix.build_type}}.tar.gz + uses: ./.github/workflows/Linux build template.yml From 53ec7f7754a2919a0a3101c784e80e558b0dda99 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Fri, 15 May 2026 09:48:48 +0200 Subject: [PATCH 2/3] Update Linux build template name and reference --- .github/workflows/Linux build template.yml | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .github/workflows/Linux build template.yml diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml new file mode 100644 index 00000000..2b778726 --- /dev/null +++ b/.github/workflows/Linux build template.yml @@ -0,0 +1,121 @@ +name: Linux build template (R4_4) + +permissions: + contents: read + +on: + workflow_call: + +jobs: + ThunderInterfaces: + + runs-on: ubuntu-24.04 + + strategy: + matrix: + build_type: [Debug, Release, MinSizeRel] + architecture: [32, 64] + +# ----- Packages & artifacts ----- + name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}} + steps: + - name: Prepare apt (add i386 if needed) + if: ${{ matrix.architecture == '32' }} + run: | + sudo dpkg --add-architecture i386 + + - name: Update apt indices (with retries) + shell: bash + run: | + set -euo pipefail + for attempt in {1..5}; do + if sudo apt-get update -o Acquire::Retries=5 -o Acquire::http::Timeout=30; then + break + fi + echo "apt-get update failed (attempt $attempt), retrying..." + sleep $((attempt*10)) + done + + - name: Install system dependencies + shell: bash + run: | + set -euo pipefail + export DEBIAN_FRONTEND=noninteractive + PKGS="python3-venv python3-pip build-essential cmake ninja-build libusb-1.0-0-dev" + if [ "${{ matrix.architecture }}" = "32" ]; then + PKGS="$PKGS zlib1g-dev:i386 libssl-dev:i386 libsbc-dev:i386 gcc-13-multilib g++-13-multilib" + else + PKGS="$PKGS zlib1g-dev libssl-dev libsbc-dev" + fi + for attempt in {1..4}; do + if sudo apt-get install -y --no-install-recommends $PKGS; then + break + fi + echo "apt-get install failed (attempt $attempt), cleaning up & retrying..." + sudo apt-get clean + sleep $((attempt*15)) + done + + - name: Set up Python environment + run: | + python3 -m venv venv + source venv/bin/activate + pip install --upgrade pip + pip install jsonref + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: Thunder-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact + path: ${{matrix.build_type}} + + - name: Unpack files + run: | + tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz + rm ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz + +# ----- Regex & checkout ----- + - name: Checkout ThunderInterfaces - default + if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:') }} + uses: actions/checkout@v4 + with: + path: ThunderInterfaces + repository: rdkcentral/ThunderInterfaces + ref: R4_4 + + - name: Regex ThunderInterfaces + if: contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:') + id: thunderinterfaces + uses: AsasInnab/regex-action@v1 + with: + regex_pattern: '(?<=\[DependsOn=ThunderInterfaces:).*(?=\])' + regex_flags: 'gim' + search_string: ${{github.event.pull_request.body}} + + - name: Checkout ThunderInterfaces - ${{steps.thunderinterfaces.outputs.first_match}} + if: contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:') + uses: actions/checkout@v4 + with: + path: ThunderInterfaces + repository: rdkcentral/ThunderInterfaces + ref: ${{steps.thunderinterfaces.outputs.first_match}} + +# ----- Building & uploading ----- + - name: Build ThunderInterfaces + run: | + source venv/bin/activate + cmake -G Ninja -S ThunderInterfaces -B ${{matrix.build_type}}/build/ThunderInterfaces \ + -DCMAKE_CXX_FLAGS="-m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-m${{matrix.architecture}}" \ + -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ + -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" + cmake --build ${{matrix.build_type}}/build/ThunderInterfaces --target install + + - name: Tar files + run: tar -czvf ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz ${{matrix.build_type}} + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ThunderInterfaces-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact + path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz From 65437591e2a26afa433c8e824ccda5038ac8dfc8 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Fri, 15 May 2026 11:23:54 +0200 Subject: [PATCH 3/3] Update workflow branches to R4_4 --- .github/workflows/Build ThunderInterfaces on Linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build ThunderInterfaces on Linux.yml b/.github/workflows/Build ThunderInterfaces on Linux.yml index c31a17b7..2cf4c4af 100644 --- a/.github/workflows/Build ThunderInterfaces on Linux.yml +++ b/.github/workflows/Build ThunderInterfaces on Linux.yml @@ -6,13 +6,13 @@ permissions: on: workflow_dispatch: push: - branches: ["development/actions-r4_4"] # TO-DO: change to R4_4 when development is over + branches: ["R4_4"] pull_request: branches: ["R4_4"] jobs: Thunder: - uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@development/actions-r4_4 # TO-DO: change to R4_4 when development is over + uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@R4_4 ThunderInterfaces: needs: Thunder