Skip to content

Commit

Permalink
Merge pull request apache#271 from iblis17/fix-travis
Browse files Browse the repository at this point in the history
travis : set make -j4 and travis_wait
  • Loading branch information
vchuravy authored Sep 10, 2017
2 parents 8bd307f + 4e5ab13 commit f34643b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ notifications:
email: false

script:
- source $TRAVIS/run_test.sh
# bump the time limit of no ouput
# the `travis_wait` wrapper can be removed once this issue fixed:
# https://github.com/JuliaLang/julia/pull/23601
- travis_wait 60 $TRAVIS/run_test.sh

after_success:
- source $TRAVIS/run_coverage.sh
Expand Down
12 changes: 10 additions & 2 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ else
info("Did not find a CUDA installation, using CPU-only version of MXNet.")
end

function get_cpucore()
if haskey(ENV, "TRAVIS") # on travis-ci
4
else
min(Sys.CPU_CORES, 8)
end
end

using BinDeps
@BinDeps.setup
if !libmxnet_detected
Expand Down Expand Up @@ -169,9 +177,9 @@ if !libmxnet_detected
ChangeDirectory(_mxdir)
`cp ../../cblas.h include/cblas.h`
if USE_JULIA_BLAS
`make -j$(min(Sys.CPU_CORES,8)) USE_BLAS=$blas_name $MSHADOW_LDFLAGS`
`make -j$(get_cpucore()) USE_BLAS=$blas_name $MSHADOW_LDFLAGS`
else
`make -j$(min(Sys.CPU_CORES,8))`
`make -j$(get_cpucore())`
end
end
FileRule(joinpath(_libdir, "libmxnet.so"), @build_steps begin
Expand Down

0 comments on commit f34643b

Please sign in to comment.