Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions #37

Merged
merged 4 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/cpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CPU
on:
push:
branches:
- pytorch_bindings
pull_request:
branches:
- pytorch_bindings
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: espnet/warpctc_builder:cpu
defaults:
run:
shell: bash --login -eo pipefail {0}
strategy:
matrix:
python-version: [3.6.12, 3.7.9, 3.8.5]
pytorch-version: [1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.1, 1.6.0]
exclude:
- python-version: 3.8.5
pytorch-version: 1.1.0
- python-version: 3.8.5
pytorch-version: 1.2.0
- python-version: 3.8.5
pytorch-version: 1.3.1
steps:
- uses: actions/checkout@v2
- name: Copy .bash_profile
run: cp /root/.bash_profile ~/
- name: Build warpctc
run: |
mkdir build
cd build
cmake ..
make
- name: Set Python version
run: pyenv global ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install numpy pytest pytest-flakes wheel torch==${{ matrix.pytorch-version }}
- name: Build wheel
run: |
cd pytorch_binding
python setup.py bdist_wheel
python wheel/rename_wheels.py
ls dist
echo "WHEEL_NAME=$(basename dist/*.whl)" >> $GITHUB_ENV
- name: Install wheel
run: |
cd pytorch_binding
pip install dist/warpctc_pytorch*.whl
- name: Run tests
run: |
cd pytorch_binding
pytest --flakes
pytest tests
- name: Set 'upload_url' of the latest release
if: startsWith(github.ref, 'refs/tags/v')
run: |
# https://docs.github.com/en/rest/reference/repos#get-the-latest-release
cmd="curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/espnet/warp-ctc/releases/latest"
output_json=$($cmd)
echo "UPLOAD_URL=$(echo $output_json | jq .upload_url | sed 's/"//g')" >> $GITHUB_ENV
- name: Upload a wheel to the latest release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/${{ env.WHEEL_NAME }}
asset_name: ${{ env.WHEEL_NAME }}
asset_content_type: application/zip
78 changes: 78 additions & 0 deletions .github/workflows/cuda100.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CUDA 10.0
on:
push:
branches:
- pytorch_bindings
pull_request:
branches:
- pytorch_bindings
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: espnet/warpctc_builder:cuda100
defaults:
run:
shell: bash --login -eo pipefail {0}
strategy:
matrix:
python-version: [3.6.12, 3.7.9, 3.8.5]
pytorch-version: [1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.1, 1.6.0]
exclude:
- python-version: 3.8.5
pytorch-version: 1.1.0
- python-version: 3.8.5
pytorch-version: 1.2.0
- python-version: 3.8.5
pytorch-version: 1.3.1
steps:
- uses: actions/checkout@v2
- name: Copy .bash_profile
run: cp /root/.bash_profile ~/
- name: Build warpctc
run: |
mkdir build
cd build
cmake ..
make
- name: Set Python version
run: pyenv global ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install numpy pytest pytest-flakes wheel torch==${{ matrix.pytorch-version }}
- name: Build wheel
run: |
cd pytorch_binding
python setup.py bdist_wheel
python wheel/rename_wheels.py
ls dist
echo "WHEEL_NAME=$(basename dist/*.whl)" >> $GITHUB_ENV
- name: Install wheel
run: |
cd pytorch_binding
pip install dist/warpctc_pytorch*.whl
- name: Run tests
run: |
cd pytorch_binding
pytest --flakes
pytest tests
- name: Set 'upload_url' of the latest release
if: startsWith(github.ref, 'refs/tags/v')
run: |
# https://docs.github.com/en/rest/reference/repos#get-the-latest-release
cmd="curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/espnet/warp-ctc/releases/latest"
output_json=$($cmd)
echo "UPLOAD_URL=$(echo $output_json | jq .upload_url | sed 's/"//g')" >> $GITHUB_ENV
- name: Upload a wheel to the latest release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/${{ env.WHEEL_NAME }}
asset_name: ${{ env.WHEEL_NAME }}
asset_content_type: application/zip
78 changes: 78 additions & 0 deletions .github/workflows/cuda101.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CUDA 10.1
on:
push:
branches:
- pytorch_bindings
pull_request:
branches:
- pytorch_bindings
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: espnet/warpctc_builder:cuda101
defaults:
run:
shell: bash --login -eo pipefail {0}
strategy:
matrix:
python-version: [3.6.12, 3.7.9, 3.8.5]
pytorch-version: [1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.1, 1.6.0]
exclude:
- python-version: 3.8.5
pytorch-version: 1.1.0
- python-version: 3.8.5
pytorch-version: 1.2.0
- python-version: 3.8.5
pytorch-version: 1.3.1
steps:
- uses: actions/checkout@v2
- name: Copy .bash_profile
run: cp /root/.bash_profile ~/
- name: Build warpctc
run: |
mkdir build
cd build
cmake ..
make
- name: Set Python version
run: pyenv global ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install numpy pytest pytest-flakes wheel torch==${{ matrix.pytorch-version }}
- name: Build wheel
run: |
cd pytorch_binding
python setup.py bdist_wheel
python wheel/rename_wheels.py
ls dist
echo "WHEEL_NAME=$(basename dist/*.whl)" >> $GITHUB_ENV
- name: Install wheel
run: |
cd pytorch_binding
pip install dist/warpctc_pytorch*.whl
- name: Run tests
run: |
cd pytorch_binding
pytest --flakes
pytest tests
- name: Set 'upload_url' of the latest release
if: startsWith(github.ref, 'refs/tags/v')
run: |
# https://docs.github.com/en/rest/reference/repos#get-the-latest-release
cmd="curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/espnet/warp-ctc/releases/latest"
output_json=$($cmd)
echo "UPLOAD_URL=$(echo $output_json | jq .upload_url | sed 's/"//g')" >> $GITHUB_ENV
- name: Upload a wheel to the latest release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/${{ env.WHEEL_NAME }}
asset_name: ${{ env.WHEEL_NAME }}
asset_content_type: application/zip
78 changes: 78 additions & 0 deletions .github/workflows/cuda102.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CUDA 10.2
on:
push:
branches:
- pytorch_bindings
pull_request:
branches:
- pytorch_bindings
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: espnet/warpctc_builder:cuda102
defaults:
run:
shell: bash --login -eo pipefail {0}
strategy:
matrix:
python-version: [3.6.12, 3.7.9, 3.8.5]
pytorch-version: [1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.1, 1.6.0]
exclude:
- python-version: 3.8.5
pytorch-version: 1.1.0
- python-version: 3.8.5
pytorch-version: 1.2.0
- python-version: 3.8.5
pytorch-version: 1.3.1
steps:
- uses: actions/checkout@v2
- name: Copy .bash_profile
run: cp /root/.bash_profile ~/
- name: Build warpctc
run: |
mkdir build
cd build
cmake ..
make
- name: Set Python version
run: pyenv global ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install numpy pytest pytest-flakes wheel torch==${{ matrix.pytorch-version }}
- name: Build wheel
run: |
cd pytorch_binding
python setup.py bdist_wheel
python wheel/rename_wheels.py
ls dist
echo "WHEEL_NAME=$(basename dist/*.whl)" >> $GITHUB_ENV
- name: Install wheel
run: |
cd pytorch_binding
pip install dist/warpctc_pytorch*.whl
- name: Run tests
run: |
cd pytorch_binding
pytest --flakes
pytest tests
- name: Set 'upload_url' of the latest release
if: startsWith(github.ref, 'refs/tags/v')
run: |
# https://docs.github.com/en/rest/reference/repos#get-the-latest-release
cmd="curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/espnet/warp-ctc/releases/latest"
output_json=$($cmd)
echo "UPLOAD_URL=$(echo $output_json | jq .upload_url | sed 's/"//g')" >> $GITHUB_ENV
- name: Upload a wheel to the latest release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/${{ env.WHEEL_NAME }}
asset_name: ${{ env.WHEEL_NAME }}
asset_content_type: application/zip
78 changes: 78 additions & 0 deletions .github/workflows/cuda92.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CUDA 9.2
on:
push:
branches:
- pytorch_bindings
pull_request:
branches:
- pytorch_bindings
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
container:
image: espnet/warpctc_builder:cuda92
defaults:
run:
shell: bash --login -eo pipefail {0}
strategy:
matrix:
python-version: [3.6.12, 3.7.9, 3.8.5]
pytorch-version: [1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.1, 1.6.0]
exclude:
- python-version: 3.8.5
pytorch-version: 1.1.0
- python-version: 3.8.5
pytorch-version: 1.2.0
- python-version: 3.8.5
pytorch-version: 1.3.1
steps:
- uses: actions/checkout@v2
- name: Copy .bash_profile
run: cp /root/.bash_profile ~/
- name: Build warpctc
run: |
mkdir build
cd build
cmake ..
make
- name: Set Python version
run: pyenv global ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install numpy pytest pytest-flakes wheel torch==${{ matrix.pytorch-version }}
- name: Build wheel
run: |
cd pytorch_binding
python setup.py bdist_wheel
python wheel/rename_wheels.py
ls dist
echo "WHEEL_NAME=$(basename dist/*.whl)" >> $GITHUB_ENV
- name: Install wheel
run: |
cd pytorch_binding
pip install dist/warpctc_pytorch*.whl
- name: Run tests
run: |
cd pytorch_binding
pytest --flakes
pytest tests
- name: Set 'upload_url' of the latest release
if: startsWith(github.ref, 'refs/tags/v')
run: |
# https://docs.github.com/en/rest/reference/repos#get-the-latest-release
cmd="curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/espnet/warp-ctc/releases/latest"
output_json=$($cmd)
echo "UPLOAD_URL=$(echo $output_json | jq .upload_url | sed 's/"//g')" >> $GITHUB_ENV
- name: Upload a wheel to the latest release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: dist/${{ env.WHEEL_NAME }}
asset_name: ${{ env.WHEEL_NAME }}
asset_content_type: application/zip
Loading