-
Notifications
You must be signed in to change notification settings - Fork 34
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
Dockerize the build workflow on Travis CI for Linux #105
Conversation
e43c129
to
ab30744
Compare
ab30744
to
f0d256e
Compare
02a4bf5
to
9fa8f83
Compare
407543d
to
1e82de5
Compare
754da26
to
ca361da
Compare
ca361da
to
66659c9
Compare
@msakai Could you please review it? Don't hesitate to reach me at online/offline if you have any questions. Thanks. |
Sure! |
.travis/init-build-linux.sh
Outdated
} | ||
|
||
function check_menoh_artifact() { | ||
ldd ${PROJ_DIR}/build/menoh/libmenoh.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended that ldd
run outside docker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but, as you pointed out, it is not useful and confusing. I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
.travis.yml
Outdated
cmake . | ||
cmake | ||
-DMKLDNN_INCLUDE_DIR="$HOME/mkl-dnn-${MKLDNN_VERSION}/include" | ||
-DMKLDNN_LIBRARY="$HOME/mkl-dnn-${MKLDNN_VERSION}/lib/libmkldnn.so" . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It failed with the following error:
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Run 'cmake --help' for more information.
bash: line 76: -DMKLDNN_INCLUDE_DIR=/home/travis/mkl-dnn-0.16/include: No such file or directory
This is because the build_command_prepend
value is interpreted as "cov-configure --compiler /usr/bin/g++-7 --comptype g++ -- -march=native -fPIC -std=gnu++14 &&\n cmake\n -DMKLDNN_INCLUDE_DIR=\"$HOME/mkl-dnn-${MKLDNN_VERSION}/include\"\n -DMKLDNN_LIBRARY=\"$HOME/mkl-dnn-${MKLDNN_VERSION}/lib/libmkldnn.so\" ."
.
It seems that we need to write as follows (same indentation across lines):
build_command_prepend: >-
cov-configure --compiler /usr/bin/g++-7 --comptype g++ -- -march=native -fPIC -std=gnu++14 &&
cmake
-DMKLDNN_INCLUDE_DIR="$HOME/mkl-dnn-${MKLDNN_VERSION}/include"
-DMKLDNN_LIBRARY="$HOME/mkl-dnn-${MKLDNN_VERSION}/lib/libmkldnn.so" .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
.travis.yml
Outdated
env: PLATFORM=linux-x86_64 BUILDENV_IMAGE=okapies/buildenv:linux-x64-devtoolset-6 LINK_STATIC=true | ||
# Use Travis directly instead of container to run static code analysis using Coverity | ||
- os: linux | ||
env: RUN_COVERITY=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this build matrix entry is just for running Coverity Scan, you might want to skip script section.
How do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed to skip the build step and avoid running this job in branches other than coverity_scan
. It seems to work as expected in the target branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It looks 👌.
55b8b2c
to
10d48c8
Compare
10d48c8
to
cc2c0fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks so much! |
Run building Menoh on Linux using Docker container. Detailed design is written in .travis/README.md.
Note: Currently
linux-x86_64
platform uses GCC 6.3.1 on CentOS 6. I'd like to use more older GCC for improving binary compatibility but I'm facing some problems. I plan to solve them later.