From bbfe8c602bc469215c0c17c4d99d2492f32dc26c Mon Sep 17 00:00:00 2001 From: Liangliang He Date: Fri, 11 May 2018 15:27:35 +0800 Subject: [PATCH] Add docs build in CI --- .gitlab-ci.yml | 18 ++++++++++++++++++ docker/Dockerfile | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 012eeec8..51806a68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - cpplint - pycodestyle + - docs - platform_compitable_tests - ops_test - api_test @@ -18,6 +19,23 @@ pycodestyle: script: - pycodestyle $(find -name "*.py") +docs: + stage: docs + script: + - cd docs + - make html + - CI_LATEST_OUTPUT_PATH=/mace-build-output/$CI_PROJECT_NAME/latest + - CI_JOB_OUTPUT_PATH=/mace-build-output/$CI_PROJECT_NAME/$CI_BUILD_ID + - mkdir -p $CI_JOB_OUTPUT_PATH + - cp -r _build/html $CI_JOB_OUTPUT_PATH/docs + - rm -rf $CI_LATEST_OUTPUT_PATH + - mkdir -p $CI_LATEST_OUTPUT_PATH + - cp -r _build/html $CI_LATEST_OUTPUT_PATH/docs + + artifacts: + paths: + - docs/_build + ops_test: stage: ops_test script: diff --git a/docker/Dockerfile b/docker/Dockerfile index 8aee730d..32d0cef5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -116,7 +116,11 @@ RUN pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com pyyaml \ sh==1.12.14 \ pycodestyle==2.4.0 \ - filelock + filelock \ + sphinx \ + sphinx-autobuild \ + sphinx_rtd_theme \ + recommonmark # Download tensorflow tools RUN wget https://cnbj1.fds.api.xiaomi.com/mace/tools/transform_graph && \ -- GitLab