Skip to content

Commit

Permalink
ReadME update (#8)
Browse files Browse the repository at this point in the history
* readme and build script clean up
  • Loading branch information
SnehalA authored Sep 24, 2020
1 parent e53c274 commit 4624119
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Kernels included:
* Performance optimized Level 3 through 9 compression from Intel's [Open Source Technology Center](https://01.org/) [zlib](https://github.com/jtkukunas/zlib) library.

# Building GKL
GKL release binaries are built on CentOS 6 to enable running on most Linux distributions (see [holy-build-box](https://github.com/phusion/holy-build-box#problem-introduction) for a good discription of portability issues).
GKL release binaries are built on CentOS 7, to enable running on most Linux distributions (see [holy-build-box](https://github.com/phusion/holy-build-box#problem-introduction) for a good discription of portability issues).

## Requirements
* Java JDK 8
Expand All @@ -34,17 +34,18 @@ GKL release binaries are built on CentOS 6 to enable running on most Linux distr
Run these commands to setup the build environment on CentOS:
```
sudo yum install -y java-1.8.0-openjdk-devel git cmake patch libtool automake yasm zlib-devel centos-release-scl
sudo yum install -y devtoolset-4-gcc-c++
source scl_source enable devtoolset-4
sudo yum install -y devtoolset-7-gcc-c++
source scl_source enable devtoolset-7
```

## Build and Test
After build requirements are met, clone, build, and test:
After build requirements are met, clone, and build :
```
git clone https://github.com/Intel-HLS/GKL.git
cd GKL
./gradlew test
./gradlew build
```
For more details check `build.sh`

# License
All code is licensed under the [MIT License](https://opensource.org/licenses/MIT), except:
Expand Down
38 changes: 28 additions & 10 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
#!/usr/bin/env bash

install_dep(){
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install -y git-lfs
git lfs install
sudo yum install -y java-1.8.0-openjdk-devel git cmake patch libtool automake yasm zlib-devel centos-release-scl
sudo yum install -y devtoolset-7-gcc-*
}
echo "Installing dependencies"
if ! rpm -qa | grep git-lfs; then
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install -y git-lfs
git lfs install
fi

pkg_list=( java-1.8.0-openjdk-devel git cmake patch libtool automake yasm zlib-devel centos-release-scl devtoolset-7-gcc-c++ )
for pkg in ${pkg_list[*]}; do
if ! rpm -qa | grep ${pkg}; then
sudo yum install -y $pkg
fi
done;
}

echo "Checking dependencies"
install_dep

echo "Setting GCC"
source scl_source enable devtoolset-7
# export JAVA_PROXY="-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=1234 -Dhttps.proxyHost=proxy.example.com -Dhttps.proxyPort=1234"
# gcc --version
gcc --version

echo "Setting proxy"
PROXY_HOST=`echo $https_proxy | tr -s '/' ':' | cut -d ':' -f2`
PROXY_PORT=`echo $https_proxy | tr -s '/' ':' | cut -d ':' -f3`
export JAVA_PROXY="-Dhttps.proxyHost=$PROXY_HOST -Dhttps.proxyPort=$PROXY_PORT"

echo "Clean and Build"
./gradlew $JAVA_PROXY clean
./gradlew $JAVA_PROXY build
./gradlew $JAVA_PROXY build

0 comments on commit 4624119

Please sign in to comment.