Skip to content

Commit

Permalink
ci: rename engine and add dependencies to engine
Browse files Browse the repository at this point in the history
Add CPT Firmware and OpenSSL packages as dependencies in Engine
workflow. Rename Engine package name. Add dpdk_tag.

Signed-off-by: Nagendra T P <ntp@marvell.com>
Change-Id: Ia42f0dc34f1b0c57402f652e98c5fa9aea88db96
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/135094
Tested-by: sa_ip-toolkits-Jenkins <sa_ip-toolkits-jenkins@marvell.com>
Reviewed-by: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
  • Loading branch information
Nagendra T P authored and jerinjacobk committed Sep 9, 2024
1 parent 6336964 commit 44b9460
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/build-openssl-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
[ -s /tmp/tags ] && PKG_POSTFIX= || PKG_POSTFIX=-devel
echo "PKG_VERSION_NAME=`cat VERSION`" >> "${PWD}/artifacts/env"
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "${PWD}/artifacts/env"
FW_PKG_POSTFIX=""
if [ $PKG_POSTFIX = -devel ]; then
FW_PKG_POSTFIX=""
else
FW_PKG_POSTFIX=$PKG_POSTFIX
fi
echo "FW_PKG_POSTFIX=${FW_PKG_POSTFIX}" >> "${PWD}/artifacts/env"
echo "DPDK_BASE_PKG_VERSION=`cat DPDK_VERSION | grep BASE_VERSION | awk -F'=' '{print $2}' | awk -F'.' '{print $1"."$2}'`" >> "${PWD}/artifacts/env"
echo "DPDK_PKG_VERSION=`cat DPDK_VERSION | grep RELEASE_VERSION | awk -F'=' '{print $2}'`" >> "${PWD}/artifacts/env"
source "${PWD}/artifacts/env"
Expand Down Expand Up @@ -107,6 +114,7 @@ jobs:
git clone "https://github.com/MarvellEmbeddedProcessors/marvell-openssl-engine.git"
cd "${PWD}/marvell-openssl-engine"
echo "ENGINE_VERSION=`cat localversion`" >> "${BASE_DIR}/artifacts/env"
echo "CPT_PKG_VERSION=`cat CPT_PKG_VERSION`" >> "${BASE_DIR}/artifacts/env"
source /artifacts/env
export DPDK_INSTALL=/
make OTX2=y OSSL_CONF=y DPDK_PC=$DPDK_INSTALL/usr/lib/aarch64-linux-gnu/pkgconfig/
Expand All @@ -118,16 +126,16 @@ jobs:
cp -r "${PWD}/doc/"* "${PWD}/install/usr/local/lib/engines-1.1/doc/."
mkdir -p "${PWD}/install/DEBIAN"
cd "${PWD}/install"
echo 'Package: openssl-engine-'${ENGINE_VERSION}'-cnxk'${PKG_POSTFIX} >> DEBIAN/control
echo 'Package: ossl-eng-'${ENGINE_VERSION}'-cnxk'${PKG_POSTFIX} >> DEBIAN/control
echo 'Version: '${PKG_VERSION_NAME} >> DEBIAN/control
echo "Maintainer: Jerin Jacob (jerinj@marvell.com)" >> DEBIAN/control
echo 'Depends: dpdk-'$DPDK_BASE_PKG_VERSION'-cn10k (= '$DPDK_PKG_VERSION')' >> DEBIAN/control
echo 'Depends: cpt-firmware-cn10k'${FW_PKG_POSTFIX}' (= '$CPT_PKG_VERSION'), dpdk-'$DPDK_BASE_PKG_VERSION'-cn10k (= '$DPDK_PKG_VERSION'), openssl-'$OPENSSL_VERSION'-cnxk'$PKG_POSTFIX' (= '$PKG_VERSION_NAME')' >> DEBIAN/control
echo "Architecture: arm64" >> DEBIAN/control
echo "Description: DPDK based OpenSSL Engine for Marvell Octeon 10" >> DEBIAN/control
cd ..
mv "${PWD}/install" "${PWD}/openssl-engine-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64"
dpkg --build "openssl-engine-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64"
cp -r "openssl-engine-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64.deb" /artifacts/.
mv "${PWD}/install" "${PWD}/ossl_eng-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64"
dpkg --build "ossl_eng-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64"
cp -r "ossl_eng-${ENGINE_VERSION}-cnxk${PKG_POSTFIX}_${PKG_VERSION_NAME}_arm64.deb" /artifacts/.
- name: Export version name
id: artifacts
run: |
Expand All @@ -141,23 +149,27 @@ jobs:
[[ "$PKG_POSTFIX" == "-devel" ]] && TAG=devel || TAG=${PKG_VERSION_NAME}
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "$GITHUB_OUTPUT"
echo "TAG=${TAG}" >> "$GITHUB_OUTPUT"
echo $DPDK_PKG_VERSION
echo "DPDK_PKG_VERSION=${DPDK_PKG_VERSION}" >> "$GITHUB_OUTPUT"
echo $DPDK_BASE_PKG_VERSION
echo "DPDK_BASE_PKG_VERSION=${DPDK_BASE_PKG_VERSION}" >> "$GITHUB_OUTPUT"
- name: Delete existing release
if: ${{ github.event_name == 'push' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view openssl-engine-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}; then
gh release delete openssl-engine-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }} --cleanup-tag -y
if gh release view ossl_eng-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}; then
gh release delete ossl_eng-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }} --cleanup-tag -y
else
echo "Release not found"
fi
- name: Release Engine cnxk package
uses: softprops/action-gh-release@v2.0.4
if: ${{ github.event_name == 'push' }}
with:
tag_name: openssl-engine-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
tag_name: ossl_eng-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
files: |
${{ github.workspace }}/artifacts/openssl-engine-${{ steps.artifacts.outputs.ENGINE_VERSION }}-cnxk${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.PKG_VERSION_NAME }}_arm64.deb
${{ github.workspace }}/artifacts/ossl_eng-${{ steps.artifacts.outputs.ENGINE_VERSION }}-cnxk${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.PKG_VERSION_NAME }}_arm64.deb
- name: Dispatch package update event
if: ${{ github.event_name == 'push' }}
run: |
Expand All @@ -168,5 +180,7 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/marvellembeddedprocessors/packages/dispatches \
-d '{"event_type":"dispatch-event", "client_payload": {"package" : "engine",
"tag": "openssl-engine-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}",
"tag": "ossl_eng-${{ steps.artifacts.outputs.ENGINE_VERSION }}-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}",
"dpdk_tag" : "dpdk-${{ steps.artifacts.outputs.DPDK_BASE_PKG_VERSION }}_${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}",
"has_dpdk" : "true",
"distro" : "${{ steps.artifacts.outputs.DISTRO }}"}}'

0 comments on commit 44b9460

Please sign in to comment.