This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
DOC: fix documents url #1735
Workflow file for this run
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: continuous build | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
unittest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# TODO Add windows test by using "windows-latest" | |
os: [ubuntu-latest, macos-latest] | |
python-version: [ '3.6', '3.7', '3.8'] | |
exclude: | |
- os: macos-latest | |
python-version: 3.6 | |
- os: macos-latest | |
python-version: 3.8 | |
- os: ubuntu-latest | |
python-version: 3.7 | |
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: ${{ matrix.python-version }} | |
architecture: x64 | |
# Install Linux specific dependencies | |
- name: Install Linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
# TODO https://github.com/apache/incubator-mxnet/issues/18293 | |
run: | | |
sudo apt-get install -y libopenblas-dev ninja-build libedit-dev libxml2-dev | |
python -m pip install "torch==1.7.1+cpu" -f https://download.pytorch.org/whl/torch_stable.html | |
# Install Mac specific dependencies | |
- name: Install Linux dependencies | |
if: matrix.os == 'macos-latest' | |
run: | | |
python -m pip install torch==1.7.1 | |
- name: Install Other Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools pytest pytest-cov contextvars | |
python -m pip install --upgrade cython | |
python -m pip install --pre "mxnet>=2.0.0b20210121" -f https://dist.mxnet.io/python | |
python -m pip install -U -e .[extras,dev] | |
- name: Build and Install TVM | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
git clone https://github.com/apache/incubator-tvm tvm --recursive | |
cd tvm | |
mkdir -p build | |
cp cmake/config.cmake build | |
echo set\(USE_LLVM ON\) >> build/config.cmake | |
echo set\(USE_GRAPH_EXECUTOR ON\) >> build/config.cmake | |
echo set\(USE_BLAS openblas\) >> build/config.cmake | |
cd build | |
cmake .. -G Ninja | |
ninja | |
cd ../python | |
python -m pip install -U -e . | |
- name: Run Unittests | |
run: | | |
python -m pytest -vv --cov=./ --cov-report=xml --device="cpu" --durations=50 tests/ | |
- name: Upload the files generated by the learn + apply subword | |
uses: actions/upload-artifact@v2 | |
with: | |
name: learn_apply_subword_ende | |
path: tests/process_cli/learn_apply_subword_ende_results/wmt19-test-de-en.* | |
- name: Upload the files generated by the learn + apply subword | |
uses: actions/upload-artifact@v2 | |
with: | |
name: learn_apply_subword_zh | |
path: tests/process_cli/learn_apply_subword_zh_results/wmt19-test-zh-en.* |