Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions a/array_record/array_record_0.8.3_ubi_10.2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : array_record
# Version : v0.8.3
# Source repo : https://github.com/google/array_record
# Tested on : UBI:10.2
# Language : Python
# Ci-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Sakshi Jain <sakshi.jain16@ibm.com>
#
# Disclaimer: This script has been tested in root mode on the given
# platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such a case, please
# contact the "Maintainer" of this script.
# ----------------------------------------------------------------------------

PACKAGE_NAME=array_record
PACKAGE_VERSION=${1:-v0.8.3}
PACKAGE_URL=https://github.com/google/array_record
PACKAGE_DIR=array_record
BAZEL_VERSION=7.2.1

export CURRENT_DIR=$(pwd -P)

yum install -y git make cmake zip tar wget python3.14 python3.14-devel python3.14-pip python3-devel java-21-openjdk-devel java-21-openjdk java-21-openjdk-headless gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc zlib-devel libjpeg-devel openssl openssl-devel freetype-devel pkgconfig rsync

export GCC_TOOLSET_PATH=/opt/rh/gcc-toolset-15/root/usr
export PATH=$GCC_TOOLSET_PATH/bin:$PATH

export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
export PATH=$PATH:$JAVA_HOME/bin

#Install bazel
mkdir bazel
cd bazel
wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip
unzip bazel-${BAZEL_VERSION}-dist.zip
sed -i '/#include "src\/main\/cpp\/util\/logging.h"/a #include <cstdint>' src/main/cpp/archive_utils.h
sed -i '/#include "src\/main\/cpp\/util\/logging.h"/a #include <cstdint>' src/main/cpp/blaze.h
env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk --jobs=4" bash ./compile.sh
cp output/bazel /usr/local/bin
export PATH=/usr/local/bin:$PATH
cd $CURRENT_DIR

export PYTHON_BIN=$(which python3.14)
export PYTHON_VERSION=$($PYTHON_BIN -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")

python3.14 -m pip cache purge
python3.14 -m pip install setuptools wheel etils typing_extensions importlib_resources

cd $CURRENT_DIR
git clone $PACKAGE_URL
cd $PACKAGE_NAME
export CURRENT_DIR=$(pwd -P)
git checkout $PACKAGE_VERSION

wget https://raw.githubusercontent.com/ppc64le/build-scripts/master/a/array_record/array_record_${PACKAGE_VERSION}.patch
git apply array_record_${PACKAGE_VERSION}.patch

python3.14 -m pip install setuptools wheel etils typing_extensions importlib_resources absl-py

#Build package
if ! python3.14 -m pip install . ; then
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

#Tests are performed in build_whl.sh
if ! sh oss/build_whl.sh ; then
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
cp $CURRENT_DIR/array_record/dist/* $CURRENT_DIR
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi
7 changes: 5 additions & 2 deletions a/array_record/build_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"maintainer": "kiranNukal",
"maintainer": "SakshiJain0302",
"package_name": "array_record",
"github_url": "https://github.com/google/array_record",
"version": "v0.8.3",
Expand All @@ -17,7 +17,10 @@
"build_script":"array_record_0.8.2_ubi_9.6.sh"
},
"v0.8.3": {
"build_script":"array_record_0.8.2_ubi_9.6.sh"
"build_script": [
"array_record_0.8.2_ubi_9.6.sh",
"array_record_0.8.3_ubi_10.2.sh"
]
},
"*": {
"build_script": "array_record_ubi_9.3.sh"
Expand Down
Loading