You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by la...@apache.org on 2021/08/14 23:07:09 UTC

[incubator-mxnet] branch master updated: [CI] Move link check from jenkins to github action (#20526)

This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new c6a97e2  [CI] Move link check from jenkins to github action (#20526)
c6a97e2 is described below

commit c6a97e230bb670a87dc8044e01c5c4a3eb82934d
Author: Zhenghui Jin <69...@users.noreply.github.com>
AuthorDate: Sat Aug 14 16:05:39 2021 -0700

    [CI] Move link check from jenkins to github action (#20526)
---
 .github/workflows/link_check.yml | 70 ++++++++++++++++++++++++++++++++++++++++
 docs/python_docs/python/Makefile |  8 ++++-
 2 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml
new file mode 100644
index 0000000..a2de5bc
--- /dev/null
+++ b/.github/workflows/link_check.yml
@@ -0,0 +1,70 @@
+name: link check
+
+on: [push, pull_request]
+
+defaults:
+  run:
+    shell: bash
+
+jobs:
+  linkcheck:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+
+      - name: Compilation cache
+        uses: actions/cache@v2
+        with:
+          path: ~/.ccache
+          # We include the commit sha in the cache key, as new cache entries are
+          # only created if there is no existing entry for the key yet.
+          key: ${{ runner.os }}-ccache-${{ github.sha }}
+          # Restore any ccache cache entry, if none for
+          # ${{ runner.os }}-ccache-${{ github.sha }} exists
+          restore-keys: |
+            ${{ runner.os }}-ccache
+
+      - name: Setup python
+        uses: actions/setup-python@v2
+        with:
+          python-version: '3.6'
+          architecture: x64
+
+      - name: Install Dependencies
+        run: |
+          sudo apt-get install -y libopenblas-dev ninja-build ccache python3-sphinx \
+              pandoc gcc-7 g++-7 libopencv-dev protobuf-compiler libprotobuf-dev
+          ccache -M 500M  # Limit the ccache size; Github's overall cache limit is 5GB
+          python -m pip install -r docs/python_docs/requirements
+          python -m pip install docs/python_docs/themes/mx-theme
+        shell: bash
+
+      - name: Build project
+        env:
+          CC: gcc-7
+          CXX: g++-7
+        run: |
+          git submodule update --init --recursive
+          mkdir build; cd build
+          CXXFLAGS="-Wno-error=strict-overflow" cmake \
+              -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
+              -DUSE_ONEDNN=OFF \
+              -DUSE_CUDA=OFF \
+              -G Ninja ..
+          ninja
+          cd ..
+        shell: bash
+
+      - name: Setup Python
+        run: |
+          python -m pip install --user -e python
+
+      - name: Link Check
+        run: |
+          cd docs/python_docs/python
+          make clean
+          make linkcheck EVAL=0
+        shell: bash
diff --git a/docs/python_docs/python/Makefile b/docs/python_docs/python/Makefile
index e688910..1842d8a 100644
--- a/docs/python_docs/python/Makefile
+++ b/docs/python_docs/python/Makefile
@@ -42,6 +42,12 @@ build/%: %
 	@mkdir -p $(@D)
 	@cp -r $< $@
 
+linkcheck: $(OBJ)
+	mkdir -p build;
+	cp Makefile_sphinx build/Makefile;
+	cp -n -r ../_static build/ || true;
+	sphinx-autogen build/api/*.rst build/api/**/*.rst   -t build/_templates/;
+	make -C build linkcheck;
 
 html: $(OBJ)
 	mkdir -p build;
@@ -49,7 +55,7 @@ html: $(OBJ)
 	cp -n -r ../_static build/ || true;
 	sphinx-autogen build/api/*.rst build/api/**/*.rst   -t build/_templates/;
 	# make -C build linkcheck doctest html
-	make -C build linkcheck html;
+	make -C build html;
 	sed -i.bak 's/33\,150\,243/23\,141\,201/g'  build/_build/html/_static/material-design-lite-1.3.0/material.blue-deep_orange.min.css;
 	make update_github_link