-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build* | ||
build*/ | ||
data/* | ||
external/protobuf/ | ||
runx/onnx/onnx.pb.cc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
|
||
# retrieve arguments | ||
while [[ $# != 0 ]]; do | ||
case $1 in | ||
--) | ||
shift | ||
break | ||
;; | ||
--source-dir) | ||
ARG_SOURCE_DIR="$2" | ||
shift 2 | ||
;; | ||
--install-dir) | ||
ARG_INSTALL_DIR="$2" | ||
shift 2 | ||
;; | ||
--link-static-libgcc) | ||
ARG_LINK_STATIC_LIBGCC="$2" | ||
shift 2 | ||
;; | ||
--link-static-libstdcxx) | ||
ARG_LINK_STATIC_LIBSTDCXX="$2" | ||
shift 2 | ||
;; | ||
--link-static-libprotobuf) | ||
ARG_LINK_STATIC_LIBPROTOBUF="$2" | ||
shift 2 | ||
;; | ||
-*) | ||
err Unknown option \"$1\" | ||
exit | ||
;; | ||
*) | ||
break | ||
;; | ||
|
||
esac | ||
done | ||
|
||
# validate the arguments | ||
test -n "${ARG_SOURCE_DIR}" || { echo "--source-dir is not specified"; exit 1; } | ||
|
||
test -n "${ARG_LINK_STATIC_LIBGCC}" || ARG_LINK_STATIC_LIBGCC='OFF' | ||
test -n "${ARG_LINK_STATIC_LIBSTDCXX}" || ARG_LINK_STATIC_LIBSTDCXX='OFF' | ||
test -n "${ARG_LINK_STATIC_LIBPROTOBUF}" || ARG_LINK_STATIC_LIBPROTOBUF='OFF' | ||
|
||
echo -e "\e[33;1mBuilding Menoh\e[0m" | ||
|
||
cd ${ARG_SOURCE_DIR}/menoh | ||
[ -d "build" ] || mkdir -p build | ||
|
||
cd build | ||
if [ -n "${ARG_INSTALL_DIR}" ]; then | ||
CMAKE_INSTALL_PREFIX="-DCMAKE_INSTALL_PREFIX=${ARG_INSTALL_DIR}" | ||
fi | ||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
${CMAKE_INSTALL_PREFIX} \ | ||
-DLINK_STATIC_LIBGCC=${ARG_LINK_STATIC_LIBGCC} \ | ||
-DLINK_STATIC_LIBSTDCXX=${ARG_LINK_STATIC_LIBSTDCXX} \ | ||
-DLINK_STATIC_LIBPROTOBUF=${ARG_LINK_STATIC_LIBPROTOBUF} \ | ||
-DENABLE_TEST=ON \ | ||
.. | ||
|
||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash -ex | ||
|
||
BASE_DIR=$(cd $(dirname $0) && pwd) | ||
|
||
# initialize this script | ||
source ${BASE_DIR}/../init-build-linux.sh | ||
|
||
# check the environment | ||
docker_exec "ls -l ${WORK_DIR}" | ||
docker_exec "ls -l ${WORK_DIR}/build" | ||
docker_exec "ls -l ${WORK_DIR}/build/${TRAVIS_REPO_SLUG}" | ||
|
||
docker_exec "(printenv | grep PATH) && make --version && cmake --version && g++ --version && ldd --version" | ||
|
||
# build and install prerequisites | ||
install_protobuf | ||
install_mkldnn | ||
|
||
docker_exec "pip3 install --user chainer" # for generating test data | ||
|
||
docker_exec "yum list installed" | ||
docker_exec "pip list" | ||
|
||
# build and test menoh | ||
prepare_menoh_data | ||
build_menoh | ||
test_menoh | ||
|
||
# check the artifact and release | ||
check_menoh_artifact | ||
|
||
# release the artifact | ||
# TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
BASE_DIR=$(cd $(dirname $0) && pwd) | ||
|
||
# initialize this script | ||
source ${BASE_DIR}/../init-build-osx.sh | ||
|
||
# check the environment | ||
ls -l ${WORK_DIR} | ||
ls -l ${WORK_DIR}/build | ||
ls -l ${WORK_DIR}/build/${TRAVIS_REPO_SLUG} | ||
|
||
printenv | grep PATH | ||
make --version | ||
cmake --version | ||
g++ --version | ||
|
||
# install prerequisites | ||
brew update | ||
brew upgrade python | ||
|
||
export PATH=/usr/local/opt/python/libexec/bin:$PATH | ||
|
||
brew install numpy || true | ||
brew install opencv mkl-dnn | ||
|
||
if [ "$LINK_STATIC" != "true" ]; then brew install protobuf; fi | ||
|
||
pip install --user chainer # for generating test data | ||
|
||
brew list --versions | ||
pip list | ||
|
||
# build and test menoh | ||
prepare_menoh_data | ||
build_menoh | ||
test_menoh | ||
|
||
# check the artifact and release | ||
check_menoh_artifact |