From baefaaff0cab25034a952083afef8d79bf5c78ed Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 16 Jan 2025 12:14:39 +0100 Subject: [PATCH 1/2] chore(ci): build Falco in RelWithDebInfo, and upload Falco debug symbols as github artifacts. Then, upload these artifacts as release assets. Signed-off-by: Federico Di Pierro --- .github/workflows/release.yaml | 19 +++++++++++++++++++ .../workflows/reusable_build_packages.yaml | 11 +++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 21a7c47023a..49312f20701 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -160,9 +160,28 @@ jobs: echo "" >> release-body.md echo "#### Release Manager @${{ github.event.release.author.login }}" >> release-body.md + - name: Download debug symbols for Falco x86_64 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: falco-${{ inputs.version }}-x86_64.debug + + - name: Rename x86_64 debug symbols + run: mv falco.debug falco_x86_64.debug + + - name: Download debug symbols for Falco aarch64 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: falco-${{ inputs.version }}-aarch64.debug + + - name: Rename aarch64 debug symbols + run: mv falco.debug falco_aarch64.debug + - name: Release uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 with: body_path: ./release-body.md tag_name: ${{ github.event.release.tag_name }} name: ${{ github.event.release.name }} + files: | + falco-x86_64.debug + falco-aarch64.debug diff --git a/.github/workflows/reusable_build_packages.yaml b/.github/workflows/reusable_build_packages.yaml index 36d5fb2ce15..21669565523 100644 --- a/.github/workflows/reusable_build_packages.yaml +++ b/.github/workflows/reusable_build_packages.yaml @@ -77,7 +77,7 @@ jobs: - name: Prepare project run: | cmake -B build -S . \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DUSE_BUNDLED_DEPS=On \ -DFALCO_ETC_DIR=/etc/falco \ -DMODERN_BPF_SKEL_DIR=/tmp \ @@ -113,7 +113,14 @@ jobs: with: name: falco-${{ inputs.version }}-${{ inputs.arch }}.rpm path: | - ${{ github.workspace }}/build/falco-*.rpm + ${{ github.workspace }}/build/falco-*.rpm + + - name: Upload Falco debug symbols + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: falco-${{ inputs.version }}-${{ inputs.arch }}.debug + path: | + ${{ github.workspace }}/build/userspace/falco/falco.debug build-packages-debug: # See https://github.com/actions/runner/issues/409#issuecomment-1158849936 From bd80885cbf27468707172de1716c20a0b6bf95c5 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 16 Jan 2025 14:54:59 +0100 Subject: [PATCH 2/2] fix(ci): fixed Falco release debug symbols names. Signed-off-by: Federico Di Pierro --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49312f20701..045efd862aa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -163,18 +163,18 @@ jobs: - name: Download debug symbols for Falco x86_64 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: - name: falco-${{ inputs.version }}-x86_64.debug + name: falco-${{ github.event.release.tag_name }}-x86_64.debug - name: Rename x86_64 debug symbols - run: mv falco.debug falco_x86_64.debug + run: mv falco.debug falco-x86_64.debug - name: Download debug symbols for Falco aarch64 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: - name: falco-${{ inputs.version }}-aarch64.debug + name: falco-${{ github.event.release.tag_name }}-aarch64.debug - name: Rename aarch64 debug symbols - run: mv falco.debug falco_aarch64.debug + run: mv falco.debug falco-aarch64.debug - name: Release uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15