Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pre build steps to build scripts #55

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ sudo python3 -m pip install pybind11 gcovr==5.0

On initial build:

1. Build AWS-SDK-CPP: `./scripts/build_aws-sdk.sh`
2. Install the resulting AWS-SDK-CPP RPM: `sudo yum install ./dss-ansible/artifacts/aws-sdk-cpp-*.rpm -y`
3. Run the `build_all.sh` script: `./scripts/build_all.sh`
1. Set up the build environment: `./scripts/build_pre.sh`
2. Build AWS-SDK-CPP: `./scripts/build_aws-sdk.sh`
3. Install the resulting AWS-SDK-CPP RPM: `sudo yum install ./dss-ansible/artifacts/aws-sdk-cpp-*.rpm -y`
4. Run the `build_all.sh` script: `./scripts/build_all.sh`

Once the AWS RPM is installed, only the `build_all.sh` script needs to be run on subsequent builds.

Expand Down
2 changes: 1 addition & 1 deletion dss-ecosystem
43 changes: 43 additions & 0 deletions scripts/build_pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set -e && \
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \
yum install epel-release centos-release-scl-rh -y && \
yum install bc bison boost-devel cmake cmake3 CUnit-devel devtoolset-11 dpkg elfutils-libelf-devel \
flex gcc gcc-c++ git glibc-devel gmp-devel jemalloc-devel Judy-devel libaio-devel libcurl-devel libmpc-devel \
libuuid-devel make man-db meson mpfr-devel ncurses-devel numactl-devel openssl openssl-devel patch \
pulseaudio-libs-devel python3 python3-devel python3-pip rdma-core-devel redhat-lsb-core rpm-build \
snappy-devel tbb-devel wget zlib-devel dnf -y && \
dnf install cppunit-devel -y && \
python3 -m pip install pybind11 gcovr==5.0
# && \
# wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && \
# rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz && \
# export PATH=$PATH:/usr/local/go/bin && go version

# Set Go variables
# Set path variables
SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
GIT_DIR=$(realpath "$SCRIPT_DIR/..")
GOVER='1.12'
GODIR="$GIT_DIR/go_$GOVER"
# echo $GODIR
GOTGZ="go$GOVER.linux-amd64.tar.gz"
GOURL="https://dl.google.com/go/$GOTGZ"
GITHUBDIR='github.com/minio'
MINIODIR='minio'
export GO111MODULE=off
export GOPATH="$GODIR"
export PATH="$PATH:$GODIR/bin"

echo 'Downloading go'
if [ ! -d "$GODIR" ]; then
mkdir "$GODIR"
if [ ! -e "./$GOTGZ" ]; then
wget "$GOURL" --no-check-certificate
fi
tar xzf "$GOTGZ" -C "$GODIR" --strip-components 1
rm -f "$GOTGZ"
fi

go version
Loading