trans: update po files #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy (master) | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
Flow: | |
name: Build master branches MegEngine and dev docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout documentation repsitory | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 | |
submodules: recursive | |
- name: Checkout MegEngine repsitory | |
uses: actions/checkout@v2 | |
with: | |
repository: MegEngine/MegEngine | |
path: megengine | |
ref: master | |
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@v2 | |
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@v2 | |
with: | |
python-version: 3.7 | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install -r megengine/imperative/python/requires.txt | |
- name: Install pandoc and other dependencies | |
run: sudo apt install -y pandoc graphviz | |
- name: Build MegEngine | |
run: | | |
cd ${GITHUB_WORKSPACE}/megengine | |
./third_party/prepare.sh | |
./third_party/install-mkl.sh | |
cmake -S . -B build -DMGE_WITH_DISTRIBUTED=OFF -DMGE_WITH_CUDA=OFF -DMGE_WITH_LITE=ON | |
make -C build -j$(($(nproc) * 2)) | |
make -C build -j$(($(nproc) * 2)) develop | |
- name: Generate static.tgz | |
run: | | |
export PYTHONPATH=${GITHUB_WORKSPACE}/megengine/imperative/python:$PYTHONPATH | |
export PYTHONPATH=${GITHUB_WORKSPACE}/megengine/lite/pylite:$PYTHONPATH | |
export LITE_LIB_PATH=${GITHUB_WORKSPACE}/megengine/build/lite/liblite_shared.so | |
export MGE_DOC_MODE="FULL" | |
cd ${GITHUB_WORKSPACE} | |
./scripts/oss/build_for_oss.sh | |
- name: Deploy on OSS | |
run: | | |
export GIT_HASH=$(git rev-parse --short HEAD) && echo $GIT_HASH | |
wget http://gosspublic.alicdn.com/ossutil/1.7.7/ossutil64 | |
chmod 755 ossutil64 | |
./ossutil64 config -e ${{ secrets.OSS_PROD_ENDPOINT }} -i ${{ secrets.OSS_PROD_ACCESS_KEY_ID }} -k ${{ secrets.OSS_PROD_ACCESS_KEY_SECRET }} | |
./ossutil64 mkdir oss://${{ secrets.OSS_PROD_BUCKET }}/documentation/commit-$GIT_HASH | |
./ossutil64 cp static.tgz oss://${{ secrets.OSS_PROD_BUCKET }}/documentation/commit-$GIT_HASH/static.tgz | |
./ossutil64 cp -f oss://${{ secrets.OSS_PROD_BUCKET }}/documentation/mapping.json . | |
export MGE_DOC_MODE="MINI" | |
version=`python3 -c "from source.conf import version; print(version)"` | |
python3 scripts/oss/update.py -v "master" -c ${GIT_HASH} | |
./ossutil64 cp -f mapping.json oss://${{ secrets.OSS_PROD_BUCKET }}/documentation/mapping.json |