CI #979
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: 0 0 * * 1 | |
jobs: | |
linter_and_test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
max-parallel: 8 | |
matrix: | |
python-version: ["3.8"] | |
pytorch-version: [1.8.1, 1.9, 1.10.2, 1.11.0, 1.12.1, 1.13.1, 2.0.1, 2.1.0] | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip- | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsndfile-dev | |
# make python env | |
cd tools; make CUDA_VERSION="" PYTHON=python${{ matrix.python-version }} PYTORCH_VERSION=${{ matrix.pytorch-version }} | |
# install shell check | |
wget https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz | |
tar -xvf shellcheck-stable.linux.x86_64.tar.xz | |
- name: ShellCheck | |
run: | | |
export PATH=shellcheck-stable:$PATH | |
# not to check the script copied from kaldi | |
find egs -name "*.sh" | grep -v path.sh | while read line; do shellcheck -x --shell=bash -P $(dirname $line) ${line}; done | |
- name: Black & isort & Flake8 | |
run: | | |
source tools/venv/bin/activate | |
black --diff --check parallel_wavegan | |
isort --diff --check parallel_wavegan | |
flake8 parallel_wavegan | |
flake8 --extend-ignore=D test | |
- name: Pytest | |
run: | | |
source tools/venv/bin/activate | |
pytest test | |
integration: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 10 | |
matrix: | |
python-version: ["3.10"] | |
pytorch-version: [2.1.0] | |
config: | |
- "parallel_wavegan.v1.debug.yaml" | |
- "melgan.v1.debug.yaml" | |
- "melgan.v3.debug.yaml" | |
- "multi_band_melgan.v1.debug.yaml" | |
- "parallel_wavegan.v1.debug.npy.yaml" | |
- "parallel_wavegan.v1.debug.diff_fs.yaml" | |
- "hifigan.v1.debug.yaml" | |
- "style_melgan.v1.debug.yaml" | |
- "uhifigan.v1.debug.yaml" | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip- | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsndfile-dev jq | |
# make python env | |
cd tools; make CUDA_VERSION="" PYTHON=python${{ matrix.python-version }} PYTORCH_VERSION=${{ matrix.pytorch-version }} | |
source venv/bin/activate | |
pip install torch-yin | |
- name: Integration | |
run: | | |
cd egs/yesno/voc1 && ./run.sh --conf conf/${{ matrix.config }} | |
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: artifacts-${{ matrix.config }} | |
path: egs/yesno/voc1 | |
integration_segments: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 10 | |
matrix: | |
python-version: ["3.10"] | |
pytorch-version: [2.1.0] | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip- | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsndfile-dev jq | |
# make python env | |
cd tools; make CUDA_VERSION="" PYTHON=python${{ matrix.python-version }} PYTORCH_VERSION=${{ matrix.pytorch-version }} | |
source venv/bin/activate | |
pip install torch-yin | |
- name: Integration | |
run: | | |
cd egs/yesno/voc1 && ./run.sh --use_fake_segments true | |
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: artifacts-${{ matrix.config }} | |
path: egs/yesno/voc1 | |
integration_vq: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 10 | |
matrix: | |
python-version: ["3.10"] | |
pytorch-version: [2.1.0] | |
config: | |
- "melgan_vae.v3.debug.yaml" | |
- "conditioned_melgan_vae.v3.debug.yaml" | |
- "local_conditioned_melgan_vae.v3.debug.yaml" | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip- | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsndfile-dev jq | |
# make python env | |
cd tools; make CUDA_VERSION="" PYTHON=python${{ matrix.python-version }} PYTORCH_VERSION=${{ matrix.pytorch-version }} | |
source venv/bin/activate | |
pip install "Cython<=0.29.36" | |
pip install pyreaper --no-build-isolation | |
- name: Integration | |
run: | | |
cd egs/yesno/vq1 && ./run.sh --conf conf/${{ matrix.config }} | |
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: artifacts-${{ matrix.config }} | |
path: egs/yesno/voc1 |