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

Dockerize the build workflow on Travis CI for Linux #105

Merged
merged 12 commits into from
Sep 19, 2018

Conversation

okapies
Copy link
Member

@okapies okapies commented Sep 14, 2018

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.

@okapies okapies force-pushed the feature/travis-dockernize branch 2 times, most recently from e43c129 to ab30744 Compare September 14, 2018 07:46
@okapies okapies requested a review from msakai September 14, 2018 10:17
@okapies okapies changed the title WIP: Dockernize Travis build for Linux Dockernize Travis build for Linux Sep 14, 2018
@okapies okapies force-pushed the feature/travis-dockernize branch 7 times, most recently from 407543d to 1e82de5 Compare September 17, 2018 16:28
@okapies okapies force-pushed the feature/travis-dockernize branch 3 times, most recently from 754da26 to ca361da Compare September 17, 2018 17:55
@okapies
Copy link
Member Author

okapies commented Sep 18, 2018

@msakai Could you please review it? Don't hesitate to reach me at online/offline if you have any questions. Thanks.

@msakai
Copy link
Member

msakai commented Sep 18, 2018

Sure!

}

function check_menoh_artifact() {
ldd ${PROJ_DIR}/build/menoh/libmenoh.so
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@okapies okapies changed the title Dockernize Travis build for Linux Dockerize the build workflow on Travis CI for Linux Sep 18, 2018
.travis.yml Outdated
cmake .
cmake
-DMKLDNN_INCLUDE_DIR="$HOME/mkl-dnn-${MKLDNN_VERSION}/include"
-DMKLDNN_LIBRARY="$HOME/mkl-dnn-${MKLDNN_VERSION}/lib/libmkldnn.so" .
Copy link
Member

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" .

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

@okapies okapies Sep 18, 2018

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It looks 👌.

Copy link
Member

@msakai msakai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@okapies
Copy link
Member Author

okapies commented Sep 19, 2018

Thanks so much!

@okapies okapies merged commit 74eaddd into master Sep 19, 2018
@okapies okapies deleted the feature/travis-dockernize branch September 19, 2018 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants