Skip to content

docs: add the comparison with torch #818

docs: add the comparison with torch

docs: add the comparison with torch #818

Workflow file for this run

name: Build
on:
pull_request:
branches:
- main
jobs:
Prepare:
name: Setup environment
if: ${{ github.event.label.name != 'no-build' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repsitory
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 1
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
- name: Cache Python packages
id: cache-python
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}$-${{ hashFiles('requirements.txt') }}
- name: Install MegEngine and Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
pip install megengine -f https://megengine.org.cn/whl/mge.html
Generate:
name: Build HTML files
needs: Prepare
runs-on: ubuntu-latest
strategy:
matrix:
language: ["zh_CN", "en"]
steps:
# TODO: This step is only working for zh_CN website now (it should always be on ideally).
# Because there are still lots of warnings should be fixed in en site.
# They were caused by machine translation generated contents and need to be fixed in the future.
# Finally, any warning case should break the building process.
- name: Set env for Sphinx build args
if: ${{ contains(matrix.language, 'zh') }}
run: |
echo "buildExtraArgs=--keep-going" >> $GITHUB_ENV
- name: Checkout repsitory
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 1
submodules: recursive
- name: LFS - Create hash files
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: LFS - Restore cache
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ hashFiles('.lfs-assets-id') }}
- name: LFS - pull missed files
run: git lfs pull
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7.17
- name: Get cached Python packages
id: cache-python
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}$-${{ hashFiles('requirements.txt') }}
- name: Install pandoc and other dependencies
run: sudo apt install -y pandoc graphviz
- name: Generate HTML files
run: |
make html SPHINXOPTS="-j auto -D language=${{ matrix.language }} ${{ env.buildExtraArgs }}"
mv build/html ${{ matrix.language }}
tar czf ${{ matrix.language }}.tgz ${{ matrix.language }}
- name: Upload aritifacts
uses: actions/upload-artifact@v2
with:
name: HTML
path: ${{ matrix.language }}.tgz