Merge pull request #5657 from wanchichen/patch-1 #4
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: ci on ubuntu | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
process_labels: | |
runs-on: ubuntu-latest | |
outputs: | |
is_docker: ${{ steps.step1.outputs.is_docker }} | |
steps: | |
- name: Get PR labels | |
id: pr-labels | |
uses: joerick/[email protected] | |
- name: Check whether PR is related to only docker | |
id: step1 | |
run: | | |
if [ -z "$GITHUB_PR_LABEL_ESPNET1" ] && [ -z "$GITHUB_PR_LABEL_ESPNET2" ] && [ -n "$GITHUB_PR_LABEL_DOCKER" ]; then | |
echo "is_docker=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "is_docker=false" >> "$GITHUB_OUTPUT" | |
fi | |
unit_test_espnet1_and_integration_test_espnet1: | |
runs-on: ${{ matrix.os }} | |
needs: process_labels | |
# Outputs from Previous jobs are strings. Take care in case of using True/False. | |
if: | | |
github.event.pull_request.draft == false && | |
needs.process_labels.outputs.is_docker == 'false' | |
strategy: | |
max-parallel: 20 | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
pytorch-version: [2.1.0] | |
chainer-version: [6.0.0] | |
use-conda: [false] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.7" | |
pytorch-version: 1.13.1 | |
chainer-verssion: 6.0.0 | |
use-conda: false | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: install dependencies | |
run: | | |
sudo apt-get update -qq | |
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest | |
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg | |
- name: install espnet | |
env: | |
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }} | |
TH_VERSION: ${{ matrix.pytorch-version }} | |
CHAINER_VERSION: ${{ matrix.chainer-version }} | |
USE_CONDA: ${{ matrix.use-conda }} | |
run: | | |
./ci/install.sh | |
- name: test shell | |
run: | | |
./ci/test_shell_espnet1.sh | |
- name: test python | |
run: ./ci/test_python_espnet1.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_python_espnet1 | |
- name: coverage erase | |
continue-on-error: true | |
run: | | |
source tools/activate_python.sh | |
coverage erase | |
- name: install kaldi | |
run: | | |
./ci/install_kaldi.sh | |
- name: test integration | |
run: ./ci/test_integration_espnet1.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_integration_espnet1 | |
unit_test_espnet2_and_integration_test_espnet2: | |
runs-on: ${{ matrix.os }} | |
needs: process_labels | |
if: | | |
github.event.pull_request.draft == false && | |
needs.process_labels.outputs.is_docker == 'false' | |
strategy: | |
max-parallel: 20 | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8, 3.9, "3.10"] | |
pytorch-version: [2.0.1, 2.1.0] | |
chainer-version: [6.0.0] | |
use-conda: [false] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.7" | |
pytorch-version: 1.12.1 | |
chainer-verssion: 6.0.0 | |
use-conda: false | |
- os: ubuntu-latest | |
python-version: "3.7" | |
pytorch-version: 1.13.1 | |
chainer-verssion: 6.0.0 | |
use-conda: false | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: install dependencies | |
run: | | |
sudo apt-get update -qq | |
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest | |
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg | |
- name: Get PR labels | |
id: pr-labels | |
uses: joerick/[email protected] | |
- name: install espnet | |
env: | |
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }} | |
TH_VERSION: ${{ matrix.pytorch-version }} | |
CHAINER_VERSION: ${{ matrix.chainer-version }} | |
USE_CONDA: ${{ matrix.use-conda }} | |
run: | | |
./ci/install.sh | |
- name: test shell | |
run: | | |
./ci/test_shell_espnet2.sh | |
- name: test python | |
run: ./ci/test_python_espnet2.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_python_espnet2 | |
- name: coverage erase | |
continue-on-error: true | |
run: | | |
source tools/activate_python.sh | |
coverage erase | |
- name: install kaldi | |
run: | | |
./ci/install_kaldi.sh | |
- name: test utils | |
run: ./ci/test_utils.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_utils | |
- name: coverage erase | |
continue-on-error: true | |
run: | | |
source tools/activate_python.sh | |
coverage erase | |
- name: test espnet2 integration | |
run: ./ci/test_integration_espnet2.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_integration_espnet2 | |
test_configuration_espnet2: | |
runs-on: ${{ matrix.os }} | |
needs: process_labels | |
if: | | |
github.event.pull_request.draft == false && | |
needs.process_labels.outputs.is_docker == 'false' | |
strategy: | |
max-parallel: 20 | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.7] | |
pytorch-version: [1.13.1] | |
chainer-version: [6.0.0] | |
use-conda: [false] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.10" | |
pytorch-version: 2.1.0 | |
chainer-verssion: 6.0.0 | |
use-conda: false | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: install dependencies | |
run: | | |
sudo apt-get update -qq | |
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest | |
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg | |
- name: install espnet | |
env: | |
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }} | |
TH_VERSION: ${{ matrix.pytorch-version }} | |
CHAINER_VERSION: ${{ matrix.chainer-version }} | |
USE_CONDA: ${{ matrix.use-conda }} | |
run: | | |
./ci/install.sh | |
- name: test configuration | |
run: ./ci/test_configuration_espnet2.sh | |
- uses: codecov/codecov-action@v2 | |
with: | |
flags: test_configuration_espnet2 | |
test_import: | |
runs-on: ${{ matrix.os }} | |
needs: process_labels | |
if: | | |
github.event.pull_request.draft == false && | |
needs.process_labels.outputs.is_docker == 'false' | |
strategy: | |
max-parallel: 20 | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
pytorch-version: [2.1.0] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -qq -y libsndfile1-dev | |
python3 -m pip install --upgrade pip setuptools wheel | |
- name: Install espnet with the least requirement | |
env: | |
TH_VERSION: ${{ matrix.pytorch-version }} | |
run: | | |
python3 -m pip install -U numba | |
./tools/installers/install_torch.sh false ${TH_VERSION} CPU | |
./tools/installers/install_chainer.sh CPU | |
python3 setup.py bdist_wheel | |
python3 -m pip install dist/espnet-*.whl | |
# log | |
python3 -m pip freeze | |
- name: Import all modules (Try1) | |
run: | | |
python3 ./ci/test_import_all.py | |
- name: Install espnet with the full requirement | |
env: | |
TH_VERSION: ${{ matrix.pytorch-version }} | |
run: | | |
python3 -m pip install "$(ls dist/espnet-*.whl)[all]" | |
# log | |
python3 -m pip freeze | |
- name: Import all modules (Try2) | |
run: | | |
python3 -q -X faulthandler ./ci/test_import_all.py | |
check_kaldi_symlinks: | |
runs-on: ubuntu-latest | |
needs: process_labels | |
if: | | |
github.event.pull_request.draft == false && | |
needs.process_labels.outputs.is_docker == 'false' | |
steps: | |
- uses: actions/checkout@master | |
- run: ci/check_kaldi_symlinks.sh |