@@ -445,22 +445,15 @@ jobs:
445445 shell : bash
446446 env :
447447 SOURCE_DIR : ${{ steps.extract.outputs.source_dir }}
448- PACKAGE_TYPE : ${{ matrix.package_type }}
449448 run : |
450449 set -euo pipefail
451450
452451 # Create build-logs directory and set ownership
453452 mkdir -p "${SOURCE_DIR}/build-logs"
454453 chown -R gpadmin:gpadmin "${SOURCE_DIR}/build-logs"
455454
456- # Set BUILD_DESTINATION based on package type
457- # DEB: install to debian/build (same as build-deb-cloudberry-ubuntu24.04.yml)
458- # RPM: install to default location
459- if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
460- export BUILD_DESTINATION="${SOURCE_DIR}/debian/build"
461- else
462- export BUILD_DESTINATION="/usr/local/cloudberry-db"
463- fi
455+ # Use /usr/local/cloudberry-db for all platforms
456+ export BUILD_DESTINATION="/usr/local/cloudberry-db"
464457
465458 chmod +x "${SOURCE_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
466459 chmod +x "${SOURCE_DIR}"/devops/build/automation/cloudberry/scripts/build-cloudberry.sh
@@ -479,16 +472,11 @@ jobs:
479472 shell : bash
480473 env :
481474 SOURCE_DIR : ${{ steps.extract.outputs.source_dir }}
482- PACKAGE_TYPE : ${{ matrix.package_type }}
483475 run : |
484476 set -euo pipefail
485477
486- # Set BUILD_DESTINATION to match build stage
487- if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
488- export BUILD_DESTINATION="${SOURCE_DIR}/debian/build"
489- else
490- export BUILD_DESTINATION="/usr/local/cloudberry-db"
491- fi
478+ # Use /usr/local/cloudberry-db for all platforms
479+ export BUILD_DESTINATION="/usr/local/cloudberry-db"
492480
493481 chmod +x "${SOURCE_DIR}"/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh
494482 if ! su - gpadmin -c "cd ${SOURCE_DIR} && SRC_DIR=${SOURCE_DIR} BUILD_DESTINATION=${BUILD_DESTINATION} ${SOURCE_DIR}/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh"; then
@@ -510,39 +498,31 @@ jobs:
510498 artifact_dir="${GITHUB_WORKSPACE}/package-artifacts"
511499 mkdir -p "${artifact_dir}"
512500
513- # Set BUILD_DESTINATION to match build stage
501+ # For DEB: Clean debian directory and let build-deb.sh copy from /usr/local/cloudberry-db
514502 if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
515- export BUILD_DESTINATION="${SOURCE_DIR}/debian/build"
516- # Ensure debian directory exists and is writable
517- mkdir -p "${SOURCE_DIR}/debian"
518- chown -R gpadmin:gpadmin "${SOURCE_DIR}/debian"
519- else
520- export BUILD_DESTINATION="/usr/local/cloudberry-db"
503+ rm -rf "${SOURCE_DIR}/debian"
521504 fi
522505
523506 su - gpadmin -c "
524507 set -euo pipefail
525508 cd '${SOURCE_DIR}'
526- export BUILD_DESTINATION='${BUILD_DESTINATION} '
509+ export BUILD_DESTINATION='/usr/local/cloudberry-db '
527510 if [[ '${PACKAGE_TYPE}' == 'deb' ]]; then
528- # Debug: Check architecture before packaging
529- echo '=== Architecture Debug Info ==='
530- dpkg --print-architecture || true
531- uname -m || true
532- echo '=== End Architecture Debug ==='
533511 '${SOURCE_DIR}/devops/build/packaging/deb/build-deb.sh' -v '${PACKAGING_VERSION}'
534512 else
535513 '${SOURCE_DIR}/devops/build/packaging/rpm/build-rpm.sh' -v '${PACKAGING_VERSION}' -r '1'
536514 fi
537515 "
538516
539517 if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
540- find "$(dirname "${SOURCE_DIR}")" -maxdepth 1 -type f \
541- \( -name '*.deb' -o -name '*.buildinfo' -o -name '*.changes' -o -name '*.dsc' \) \
518+ find "$(dirname "${SOURCE_DIR}")" -maxdepth 1 -type f -name '*.deb' \
542519 -exec cp -f {} "${artifact_dir}/" \;
543520 primary_pattern='*.deb'
544521 else
522+ # Copy RPM packages excluding debuginfo and debugsource packages
545523 find /home/gpadmin/rpmbuild/RPMS -type f -name '*.rpm' \
524+ ! -name '*-debuginfo-*.rpm' \
525+ ! -name '*-debugsource-*.rpm' \
546526 -exec cp -f {} "${artifact_dir}/" \;
547527 primary_pattern='*.rpm'
548528 fi
@@ -691,18 +671,22 @@ jobs:
691671 run : |
692672 set -euo pipefail
693673 artifact_dir="${GITHUB_WORKSPACE}/package-artifacts"
674+
675+ # Find package file using ls
694676 if [[ "${PACKAGE_TYPE}" == "deb" ]]; then
695- package_file="$(find "${artifact_dir}" -maxdepth 1 -type f -name ' *.deb' -print -quit)"
677+ package_file=$(ls "${artifact_dir}"/ *.deb 2>/dev/null | head -n 1)
696678 else
697- package_file="$(find "${artifact_dir}" -maxdepth 1 -type f -name ' *.rpm' ! -name '*debuginfo*' -print -quit)"
679+ package_file=$(ls "${artifact_dir}"/ *.rpm 2>/dev/null | head -n 1)
698680 fi
699681
700682 if [[ -z "${package_file}" || ! -f "${package_file}" ]]; then
701- echo "::error::Package file not found in ${artifact_dir}"
683+ echo "::error::No ${PACKAGE_TYPE} package found in ${artifact_dir}"
684+ ls -la "${artifact_dir}" || true
702685 exit 1
703686 fi
704687
705688 checksum_file="${package_file}.sha512"
689+
706690 if [[ ! -f "${checksum_file}" ]]; then
707691 echo "::error::Checksum file not found: ${checksum_file}"
708692 exit 1
0 commit comments