Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
julia/ci: add a Jenkins job for doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Mar 24, 2018
1 parent f39cab6 commit 1ba9c57
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
26 changes: 19 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -646,13 +646,25 @@ try {
}

stage('Deploy') {
node('mxnetlinux-cpu') {
ws('workspace/docs') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "ci/build.py --build --platform ubuntu_cpu /work/runtime_functions.sh deploy_docs"
sh "tests/ci_build/deploy/ci_deploy_doc.sh ${env.BRANCH_NAME} ${env.BUILD_NUMBER}"
}
parallel 'MXNet docs': {
node('mxnetlinux-cpu') {
ws('workspace/docs') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "ci/build.py --build --platform ubuntu_cpu /work/runtime_functions.sh deploy_docs"
sh "tests/ci_build/deploy/ci_deploy_doc.sh ${env.BRANCH_NAME} ${env.BUILD_NUMBER}"
}
}
}
},
'Julia docs': {
node('mxnetlinux-cpu') {
ws('workspace/julia-docs') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "ci/build.py --build --platform ubuntu_cpu /work/runtime_functions.sh deploy_jl_docs"
}
}
}
}
}
Expand Down
30 changes: 25 additions & 5 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,19 @@ unittest_ubuntu_gpu_R() {

unittest_ubuntu_cpu_julia06() {
set -ex
export PATH="/work/julia/bin:$PATH"
export MXNET_HOME='/work/mxnet'
export JULIA_PKGDIR='/work/julia-pkg'
export DEPDIR=`julia -E 'Pkg.dir()'`
export JULIA='/work/julia/bin/julia'

$JULIA -e 'versioninfo()'
julia -e 'versioninfo()'
ln -sf ${MXNET_HOME}/julia ${DEPDIR}/MXNet
# use the prebuilt binary from $MXNET_HOME/lib
$JULIA -e 'Pkg.build("MXNet")'
julia -e 'Pkg.build("MXNet")'
# run the script `julia/test/runtests.jl`
$JULIA -e 'Pkg.test("MXNet")'
julia-e 'Pkg.test("MXNet")'
# See https://github.com/dmlc/MXNet.jl/pull/303#issuecomment-341171774
julia -e 'using MXNet; mx._sig_checker()'
}

unittest_centos7_cpu() {
Expand Down Expand Up @@ -521,12 +523,30 @@ test_ubuntu_cpu_python3() {
deploy_docs() {
set -ex
pushd .

make docs

popd
}

deploy_jl_docs {
set -ex
export PATH="/work/julia/bin:$PATH"
export MXNET_HOME='/work/mxnet'
export JULIA_PKGDIR='/work/julia-pkg'
export DEPDIR=`julia -E 'Pkg.dir()'`

julia -e 'versioninfo()'
ln -sf ${MXNET_HOME}/julia ${DEPDIR}/MXNet
# use the prebuilt binary from $MXNET_HOME/lib
julia -e 'Pkg.build("MXNet")'
# build docs
julia -e 'Pkg.add("Documenter")'
julia -e 'cd(Pkg.dir("MXNet")); include(joinpath("docs", "make.jl"))'
# TODO: make Jenkins worker push to MXNet.jl ph-pages branch if master build
# ...
}

##############################################################
# MAIN
#
Expand Down

0 comments on commit 1ba9c57

Please sign in to comment.