Skip to content

Commit

Permalink
added py coverage for lin, mac and windows ctc decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
hmen97 committed Jun 9, 2021
1 parent 9e67724 commit f011f96
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 27 deletions.
48 changes: 26 additions & 22 deletions .github/actions/numpy_vers/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,63 +26,67 @@ runs:
case "${OS}:${ARCH}" in
Linux:x86_64)
case "${{ inputs.pyver }}" in
3.6*)
NUMPY_BUILD_VERSION="==1.19.2"
NUMPY_DEP_VERSION=">=1.19.2"
;;
3.7*)
NUMPY_BUILD_VERSION="==1.14.5"
NUMPY_DEP_VERSION=">=1.14.5"
NUMPY_BUILD_VERSION="==1.19.3"
NUMPY_DEP_VERSION=">=1.19.3"
;;
3.8*)
NUMPY_BUILD_VERSION="==1.17.3"
NUMPY_DEP_VERSION=">=1.17.3"
NUMPY_BUILD_VERSION="==1.19.2"
NUMPY_DEP_VERSION=">=1.19.2"
;;
3.9*)
NUMPY_BUILD_VERSION="==1.19.4"
NUMPY_DEP_VERSION=">=1.19.4"
NUMPY_BUILD_VERSION="==1.19.3"
NUMPY_DEP_VERSION=">=1.19.3"
;;
esac
;;
Darwin:*)
case "${{ inputs.pyver }}" in
3.6*)
NUMPY_BUILD_VERSION="==1.9.0"
NUMPY_DEP_VERSION=">=1.9.0"
NUMPY_BUILD_VERSION="==1.13.3"
NUMPY_DEP_VERSION=">=1.13.3"
;;
3.7*)
NUMPY_BUILD_VERSION="==1.14.5"
NUMPY_DEP_VERSION=">=1.14.5,<=1.17.0"
NUMPY_DEP_VERSION=">=1.14.5"
;;
3.8*)
NUMPY_BUILD_VERSION="==1.17.3"
NUMPY_DEP_VERSION=">=1.17.3,<=1.17.3"
NUMPY_BUILD_VERSION="==1.20.0"
NUMPY_DEP_VERSION=">=1.20.0"
;;
3.9*)
NUMPY_BUILD_VERSION="==1.19.4"
NUMPY_DEP_VERSION=">=1.19.4"
NUMPY_BUILD_VERSION="==1.20.0"
NUMPY_DEP_VERSION=">=1.20.0"
;;
esac
;;
${CI_MSYS_VERSION}:x86_64)
case "${{ inputs.pyver }}" in
3.5*)
NUMPY_BUILD_VERSION="==1.11.0"
NUMPY_DEP_VERSION=">=1.11.0,<1.12.0"
NUMPY_BUILD_VERSION="==1.16.0"
NUMPY_DEP_VERSION=">=1.16.0"
;;
3.6*)
NUMPY_BUILD_VERSION="==1.12.0"
NUMPY_DEP_VERSION=">=1.12.0,<1.14.5"
NUMPY_BUILD_VERSION="==1.16.0"
NUMPY_DEP_VERSION=">=1.16.0"
;;
3.7*)
NUMPY_BUILD_VERSION="==1.14.5"
NUMPY_DEP_VERSION=">=1.14.5,<=1.17.0"
NUMPY_BUILD_VERSION="==1.16.0"
NUMPY_DEP_VERSION=">=1.16.0"
;;
3.8*)
NUMPY_BUILD_VERSION="==1.17.3"
NUMPY_DEP_VERSION=">=1.17.3,<=1.17.3"
NUMPY_DEP_VERSION=">=1.17.3"
;;
3.9*)
NUMPY_BUILD_VERSION="==1.19.4"
NUMPY_DEP_VERSION=">=1.19.4"
NUMPY_BUILD_VERSION="==1.19.3"
NUMPY_DEP_VERSION=">=1.19.3"
;;
esac
;;
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,16 @@ jobs:
needs: [ swig_Linux ]
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'pull_request' }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: ${{ matrix.python-version }}
- run: |
python --version
pip --version
Expand All @@ -135,7 +138,7 @@ jobs:
- id: get_numpy
uses: ./.github/actions/numpy_vers
with:
pyver: 3.6
pyver: ${{ matrix.python-version }}
- name: Make decoder package
run: |
NUMPY_BUILD_VERSION=${{ steps.get_numpy.outputs.build_version }} \
Expand Down Expand Up @@ -651,13 +654,16 @@ jobs:
needs: [ swig_macOS ]
runs-on: macos-10.15
if: ${{ github.event_name == 'pull_request' }}
strategy:
matrix:
python-version: [3.6.8, 3.7.9, 3.8.8, 3.9.2]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/install-python-upstream
with:
version: 3.6.8
version: ${{ matrix.python-version }}
- run: |
python --version
pip --version
Expand All @@ -673,7 +679,7 @@ jobs:
- id: get_numpy
uses: ./.github/actions/numpy_vers
with:
pyver: 3.6.8
pyver: ${{ matrix.python-version }}
- name: Make decoder package
run: |
NUMPY_BUILD_VERSION=${{ steps.get_numpy.outputs.build_version }} \
Expand Down Expand Up @@ -1146,6 +1152,9 @@ jobs:
name: "Win|Build CTC decoder Python package"
needs: [swig_Windows_crosscompiled]
runs-on: windows-2019
strategy:
matrix:
python-version: [[3.6.8, 3.7.9, 3.8.8, 3.9.2]]
steps:
- name: Switch git-bash shell to MSYS2 shell by adding MSYS2 path to PATH front
run: echo "$MSYS2_SHELL_PATH" >> $GITHUB_PATH
Expand All @@ -1163,7 +1172,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.7.9
python-version: ${{ matrix.python-version }}
- run: |
python --version
python -m pip --version
Expand Down

0 comments on commit f011f96

Please sign in to comment.