From 7ba4e1fdd5293379c27ccc70b8a0e0ea2252453a Mon Sep 17 00:00:00 2001 From: Leonardo Held Date: Tue, 16 Jan 2024 10:30:31 -0300 Subject: [PATCH 1/5] Add deb-builder workflow Signed-off-by: Leonardo Held --- .github/workflows/deb-builder.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/deb-builder.yml diff --git a/.github/workflows/deb-builder.yml b/.github/workflows/deb-builder.yml new file mode 100644 index 0000000..f44c2a4 --- /dev/null +++ b/.github/workflows/deb-builder.yml @@ -0,0 +1,16 @@ +on: push + +jobs: + build-debs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jtdor/build-deb-action@v1 + env: + DEB_BUILD_OPTIONS: noautodbgsym + with: + buildpackage-opts: --build=binary --no-sign + host-arch: arm64 + apt-opts: --install-recommends + extra-build-deps: ca-certificates + From 65ea2f5ea0d5fdf837a2cbfeda1627e21785ff15 Mon Sep 17 00:00:00 2001 From: Leonardo Held Date: Thu, 18 Jan 2024 11:20:16 -0300 Subject: [PATCH 2/5] Change upstream of deb-builder-action leonheldtoradex/build-deb-action@7659f1f adds support for third-party feeds, which we'll use to point to feeds.toradex.com. If the commit ever gets merged into the upstream, revert this commit. Signed-off-by: Leonardo Held --- .github/workflows/deb-builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deb-builder.yml b/.github/workflows/deb-builder.yml index f44c2a4..3490519 100644 --- a/.github/workflows/deb-builder.yml +++ b/.github/workflows/deb-builder.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: jtdor/build-deb-action@v1 + - uses: leonheldattoradex/build-deb-action@v1.7.1 env: DEB_BUILD_OPTIONS: noautodbgsym with: From 8fe704503bdccaaea9bf623fd8e5503698f4dfa7 Mon Sep 17 00:00:00 2001 From: Leonardo Held Date: Thu, 18 Jan 2024 11:42:42 -0300 Subject: [PATCH 3/5] Add Toradex feed as third party Also add ca-certificates as build-dep as a minor fix. Signed-off-by: Leonardo Held --- .github/workflows/deb-builder.yml | 64 ++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deb-builder.yml b/.github/workflows/deb-builder.yml index 3490519..06de63d 100644 --- a/.github/workflows/deb-builder.yml +++ b/.github/workflows/deb-builder.yml @@ -13,4 +13,66 @@ jobs: host-arch: arm64 apt-opts: --install-recommends extra-build-deps: ca-certificates - + apt-sources: | + Types: deb + URIs: https://feeds.toradex.com/debian + Suites: testing + Components: main non-free + Signed-By: /usr/share/keyrings/build-deb-action.gpg + apt-key: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + + mQINBGUJ0fgBEADe+nvFNajvFQQPGXXLixVz4/+xLGdnmgGef6Oe4DPuIFD7WATJ + hzH8ng+elAHVIkfrV7+j9lGWnozcBqBdvHoz46Y2EE1nk3no78aUdy+9b0wx3yWe + tqY29Nu3yVD8d64e5fuGq4PKJB1gtFkWhEfFwTmq3uiRQRfAy60DERTDF7bocQsW + hTVjc/Lr1lj4POB0HlUhzIj84o/y5SV50F0oqpJdjfu6Bbp/XVHklF4GNBabaFVf + iF11306eWKcKM2yZI4MJhAPTaTSFS51Z81lbQkyLjQzfdxAvSSsNWUUS8A3IYBhi + IwyeIS3jPtBcIDPcxKDB8rio8j6eKq0FtnW1WTVMmDdBqLlE71y2Av2d2W4ySqf+ + huvhRPqCVMgsr09oHUOka19cX82YTYiMOU3/+UsKZ2DJT0w+k2z5DOirzf5SNbcA + hlc8WcjavrYTqVysB7IIQx+WsYosRXOSWMmbY+3fk5lpnz/ZZfluiz36krdYxIdd + MtiaUtrRZvj0hpbe85alUaqVJ87k1TrA5URpXV0ZOgV753QWOtjcclEroRIINEzZ + bwBjZlRrPFos/VSbsx0/2MTEkxLI/bakOihpZ53f4uhwrv8Kc7+lDLP51N8t2UAM + sORmkLsNQUdCxM8Ary+fl2h1DvvgqxE2F3uzIrpM8DgGC0+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QIHyqJqc/QRYsw + KKcWF/U+7aKlt2J24v7RFIMkNSRL9UiYcNhMgIJVIw2NkWlF4LoDRQ8l8DMD4St3 + eKYPMo0laD2+Z4ul7hUjY7pHSDSO+erfySkFpvx83XgtF9d0uJdMXQ3gRuFhwtK7 + Grl7Vu/9cvNCWtBq5/hNdGU1d4Y1HoAK6sooRbwy0JUaXHq08MDhpWQysmPpHBKX + CvvuQQ== + =VfKA + -----END PGP PUBLIC KEY BLOCK----- + apt-preferences: | + Package: * + Pin: origin feeds.toradex.com + Pin-Priority: 900 From c4c1f5d0d590edd418c9ec58c16ffa60657dcabd Mon Sep 17 00:00:00 2001 From: Leonardo Held Date: Thu, 18 Jan 2024 15:15:59 -0300 Subject: [PATCH 4/5] Add cmake as build dependency Signed-off-by: Leonardo Held --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 45c8b3f..e530d47 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Toradex Packaging Team Uploaders: Abdur Rehman , Carlos Henrique Lima Melara , Leonardo Held -Build-Depends: debhelper-compat (= 13), libgpuperfcnt +Build-Depends: debhelper-compat (= 13), cmake, libgpuperfcnt Standards-Version: 4.6.2 Homepage: https://github.com/nxp-imx/imx-gputop Rules-Requires-Root: no From bc54f297f6b0f6a994ba2e88540d4fbf287591cd Mon Sep 17 00:00:00 2001 From: Leonardo Held Date: Fri, 19 Jan 2024 16:58:33 -0300 Subject: [PATCH 5/5] github: workflows: add update-pipeline-status Signed-off-by: Leonardo Held --- .github/workflows/update-pipeline-status.yml | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/update-pipeline-status.yml diff --git a/.github/workflows/update-pipeline-status.yml b/.github/workflows/update-pipeline-status.yml new file mode 100644 index 0000000..1dd223f --- /dev/null +++ b/.github/workflows/update-pipeline-status.yml @@ -0,0 +1,40 @@ +name: Update Pipeline Status + +on: + push: + branches: + - toradex/** + +jobs: + update-readme: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Export Repo Information + run: | + echo "current_repo_name=$(basename -s .git $(git config --get remote.origin.url))" >> $GITHUB_ENV + echo "current_branch_name=${{ github.ref_name }}" >> $GITHUB_ENV + - name: Checkout Debian Package Pipeline Status Repository + uses: actions/checkout@v3 + with: + repository: torizon/debian-package-pipeline-status + path: debian-package-pipeline-status + token: ${{ secrets.DEBIAN_PACKAGE_PIPELINE_STATUS_TOKEN }} + - name: Update Debian Package Pipeline Status README + run: | + cd debian-package-pipeline-status + start_line=$(grep -n "## ${current_repo_name}" README.md | cut -d':' -f1) + + # Check if an entry for the branch already exists + existing_entry_line=$(grep -n "### ${current_branch_name}" README.md | cut -d':' -f1) + + if [ -z "${existing_entry_line}" ]; then + # Entry does not exist, add a new entry + sed -i "${start_line}a\\### ${current_branch_name} \n[![${current_repo_name} ${current_branch_name}](https://github.com/torizon/${current_repo_name}/actions/workflows/deb-builder.yml/badge.svg?branch=${branch_name})](https://github.com/torizon/${current_repo_name}/actions?query=branch:${branch_name})" README.md + git config user.name "ci.toradex" + git config user.email "cicd@toradex.com" + git add README.md + git commit -m "Update pipeline status for ${current_repo_name}/${current_branch_name}" + git push origin main + fi