From 044256f2915d0dbc7c7696988e3424a93b920dac Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 10 Oct 2024 11:57:45 +0200 Subject: [PATCH] chore(linux): improve output if dpkg-gensymbols fails and run other tests --- .github/workflows/api-verification.yml | 2 +- linux/scripts/verify_api.inc.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/api-verification.yml b/.github/workflows/api-verification.yml index de7e967b24f..443adb471f3 100644 --- a/.github/workflows/api-verification.yml +++ b/.github/workflows/api-verification.yml @@ -67,7 +67,7 @@ jobs: - name: "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }})" run: | - echo "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }})" >> $GITHUB_STEP_SUMMARY + echo "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }}):" >> $GITHUB_STEP_SUMMARY BIN_PACKAGE=$(ls "${GITHUB_WORKSPACE}/artifacts/" | grep "${PKG_NAME}[0-9]*_${{ steps.environment_step.outputs.VERSION }}-1${{ steps.environment_step.outputs.PRERELEASE_TAG }}+$(lsb_release -c -s)1_amd64.deb") cd ${{ github.workspace }}/keyman/linux diff --git a/linux/scripts/verify_api.inc.sh b/linux/scripts/verify_api.inc.sh index adaa9187c27..8334bc84b89 100644 --- a/linux/scripts/verify_api.inc.sh +++ b/linux/scripts/verify_api.inc.sh @@ -32,8 +32,12 @@ check_api_not_changed() { trap "rm -rf \"${tmpDir}\"" ERR dpkg -x "${BIN_PKG}" "${tmpDir}" mkdir -p debian/tmp/DEBIAN - dpkg-gensymbols -v"${VERSION}" -p"${PKG_NAME}" -e"${tmpDir}"/usr/lib/x86_64-linux-gnu/"${LIB_NAME}".so* -c4 - output_ok "${LIB_NAME} API didn't change" + if dpkg-gensymbols -v"${VERSION}" -p"${PKG_NAME}" -e"${tmpDir}"/usr/lib/x86_64-linux-gnu/"${LIB_NAME}".so* -c4; then + output_ok "${LIB_NAME} API didn't change" + else + output_error "${LIB_NAME} API changed" + EXIT_CODE=4 + fi cd "${REPO_ROOT}/linux" rm -rf "${tmpDir}" trap ERR