Update to use Coqpit based config handling, fix multiprocesing setup, and add CI coverage.
3591 lines
134 KiB
YAML
3591 lines
134 KiB
YAML
name: "Builds and tests"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- v*
|
|
env:
|
|
# Shared variables
|
|
CI_TASK_DIR: ${{ github.workspace }}
|
|
CI_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
|
|
EXPECTED_TENSORFLOW_VERSION: "TensorFlow: v2.3.0-14-g4bdd3955115"
|
|
|
|
# macOS specific
|
|
MACOSX_DEPLOYMENT_TARGET: "10.10"
|
|
CI_NODE_MODULES_NTH: 1
|
|
|
|
# Windows specific
|
|
CI_MSYS_VERSION: MSYS_NT-10.0-17763
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
jobs:
|
|
create-release:
|
|
name: "Create release for tag"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
release-tag: ${{ steps.check-version.outputs.release-tag }}
|
|
is-prerelease: ${{ steps.check-version.outputs.is-prerelease }}
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- name: Check VERSION file matches pushed Git tag and check if prerelease
|
|
id: check-version
|
|
run: |
|
|
set -xe
|
|
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" != "true" ]]; then
|
|
echo "Should never happen (this job only runs on tag pushes)"
|
|
exit 1
|
|
fi
|
|
|
|
VERSION="v$(cat VERSION)"
|
|
if [[ "${{ github.ref }}" != "refs/tags/${VERSION}" ]]; then
|
|
echo "Pushed tag does not match VERSION file. Aborting release."
|
|
exit 1
|
|
fi
|
|
|
|
# Tag for this release (version with leading v)
|
|
tag=$(echo "${{ github.ref }}" | sed -e 's|^refs/tags/||')
|
|
echo ::set-output name=release-tag::${tag}
|
|
|
|
# Version without leading v
|
|
version=$(cat VERSION)
|
|
echo ::set-output name=version::${version}
|
|
|
|
# Is this a prerelease or not?
|
|
pip install semver
|
|
cat <<EOF | python - "${{ github.ref }}"
|
|
import sys
|
|
import semver
|
|
ref = sys.argv[1]
|
|
prefix = "refs/tags/v"
|
|
assert ref.startswith(prefix)
|
|
parsed = semver.parse_version_info(ref[len(prefix):])
|
|
print("::set-output name=is-prerelease::{}".format("true" if parsed.prerelease else "false"))
|
|
print("::set-output name=release-notes-file::{}".format("" if parsed.prerelease else "RELEASE_NOTES.md"))
|
|
EOF
|
|
- uses: softprops/action-gh-release@v1
|
|
with:
|
|
body_path: ${{ steps.check-version.outputs.release-notes-file }}
|
|
prerelease: ${{ steps.check-version.outputs.is-prerelease }}
|
|
name: ${{ format('Coqui STT {0}', steps.check-version.outputs.version) }}
|
|
# Linux jobs
|
|
swig_Windows_crosscompiled:
|
|
name: "Lin|Build SWIG for Windows"
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
swig_hash: "90cdbee6a69d13b39d734083b9f91069533b0d7b"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: "swig/swig"
|
|
ref: ${{ env.swig_hash }}
|
|
- run: |
|
|
mkdir -p build-static/
|
|
- uses: actions/cache@v2
|
|
id: swig-build-cache
|
|
with:
|
|
path: build-static/
|
|
key: swig-win-3-${{ env.swig_hash }}
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends autoconf automake bison build-essential mingw-w64
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
curl -sSL https://github.com/coqui-ai/STT/releases/download/v0.10.0-alpha.7/pcre-8.43.tar.gz > pcre-8.43.tar.gz
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
./Tools/pcre-build.sh --host=x86_64-w64-mingw32
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
sh autogen.sh
|
|
CFLAGS="-static-libgcc -static-libstdc++" \
|
|
CXXFLAGS="-static-libgcc -static-libstdc++" \
|
|
./configure \
|
|
--host=x86_64-w64-mingw32 \
|
|
--prefix=`pwd`/build-static/ \
|
|
--program-prefix=ds-
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make -j
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make install
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}
|
|
path: ${{ github.workspace }}/build-static/
|
|
swig_Linux:
|
|
name: "Lin|Build SWIG"
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
env:
|
|
swig_hash: "90cdbee6a69d13b39d734083b9f91069533b0d7b"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: "swig/swig"
|
|
ref: ${{ env.swig_hash }}
|
|
- run: |
|
|
mkdir -p build-static/
|
|
- uses: actions/cache@v2
|
|
id: swig-build-cache
|
|
with:
|
|
path: build-static/
|
|
key: swig-4-${{ runner.os }}-${{ env.swig_hash }}
|
|
- run: |
|
|
curl -sSL https://github.com/coqui-ai/STT/releases/download/v0.10.0-alpha.7/pcre-8.43.tar.gz > pcre-8.43.tar.gz
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
./Tools/pcre-build.sh
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
sh autogen.sh
|
|
./configure \
|
|
--prefix=${{ github.workspace }}/build-static/ \
|
|
--program-prefix=ds-
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make -j
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make install
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}
|
|
path: ${{ github.workspace }}/build-static/
|
|
libsox3_Linux:
|
|
name: "Lin|Build libsox3"
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
steps:
|
|
- run: |
|
|
curl -sSL https://github.com/coqui-ai/STT/releases/download/v0.10.0-alpha.7/sox-14.4.2.tar.bz2 | tar xjf -
|
|
- run: |
|
|
mkdir -p sox-build/
|
|
- uses: actions/cache@v2
|
|
id: sox-build-cache
|
|
with:
|
|
path: sox-build/
|
|
key: sox-1-${{ runner.os }}-${{ env.sox_hash }}
|
|
- name: Configure
|
|
run: |
|
|
cd sox-14.4.2
|
|
./configure \
|
|
--with-dyn-default --enable-dl-sndfile --enable-dl-amrnb \
|
|
--without-magic --without-png --without-ladspa --without-mad \
|
|
--without-id3tag --without-lame --without-twolame \
|
|
--without-libltdl --disable-openmp --disable-dependency-tracking \
|
|
--with-gsm=no --with-lpc10=no --with-oss=no \
|
|
--prefix=${{ github.workspace }}/sox-build/
|
|
if: steps.sox-build-cache.outputs.cache-hit != 'true'
|
|
- name: Make
|
|
run: |
|
|
cd sox-14.4.2
|
|
make -j
|
|
if: steps.sox-build-cache.outputs.cache-hit != 'true'
|
|
- name: Make install
|
|
run: |
|
|
cd sox-14.4.2
|
|
make install
|
|
if: steps.sox-build-cache.outputs.cache-hit != 'true'
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}
|
|
path: ${{ github.workspace }}/sox-build/
|
|
build-ctc-decoder-Linux:
|
|
name: "Lin|Build CTC decoder Python package"
|
|
needs: [ swig_Linux ]
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- name: Make decoder package
|
|
run: |
|
|
# Setup venv
|
|
/opt/_internal/cpython-${{ matrix.python-version }}*/bin/python -m venv /tmp/venv-${{ matrix.python-version }}
|
|
source /tmp/venv-${{ matrix.python-version }}/bin/activate
|
|
|
|
# Check versions
|
|
python --version
|
|
pip --version
|
|
|
|
# Build decoder package
|
|
NUMPY_BUILD_VERSION="${{ steps.get_numpy.outputs.build_version }}" \
|
|
NUMPY_DEP_VERSION="${{ steps.get_numpy.outputs.dep_version }}" \
|
|
make -C native_client/ctcdecode/ \
|
|
NUM_PROCESSES=$(nproc) \
|
|
bindings
|
|
- name: Auditwheel repair
|
|
run: |
|
|
auditwheel repair native_client/ctcdecode/dist/*.whl
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-Linux-${{ matrix.python-version }}.whl"
|
|
path: ${{ github.workspace }}/wheelhouse/*.whl
|
|
train-test-model-Linux:
|
|
name: "Lin|Train a test model"
|
|
needs: [ "build-ctc-decoder-Linux" ]
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
bitrate: ["8k", "16k"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.6
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-Linux-3.6.whl"
|
|
- run: |
|
|
python --version
|
|
pip --version
|
|
- run: |
|
|
pip install --upgrade pip setuptools wheel
|
|
- run: |
|
|
pip install coqui_stt_ctcdecoder-*-cp36-cp36m-*_x86_64.whl
|
|
DS_NODECODER=y pip install --upgrade .
|
|
- run: |
|
|
bits=""
|
|
if [ "${{ matrix.bitrate }}" = "8k" ]; then
|
|
bits=8000
|
|
fi
|
|
if [ "${{ matrix.bitrate }}" = "16k" ]; then
|
|
bits=16000
|
|
fi
|
|
|
|
# Easier to rename to that we can exercize the LDC93S1 importer code to
|
|
# generate the CSV file.
|
|
echo "Moving ${bits} to LDC93S1.wav"
|
|
mv data/smoke_test/LDC93S1_pcms16le_1_${bits}.wav data/smoke_test/LDC93S1.wav
|
|
|
|
./bin/run-ci-ldc93s1_new.sh 249 ${bits}
|
|
./bin/run-ci-ldc93s1_tflite.sh ${bits}
|
|
- run: |
|
|
wget -O temp.zip https://github.com/coqui-ai/STT/releases/download/v0.9.3/convert_graphdef_memmapped_format.linux.amd64.zip
|
|
unzip temp.zip
|
|
rm temp.zip
|
|
chmod +x convert_graphdef_memmapped_format
|
|
./convert_graphdef_memmapped_format --in_graph=/tmp/train/output_graph.pb --out_graph=/tmp/train/output_graph.pbmm
|
|
- run: |
|
|
tar -cf - \
|
|
-C /tmp/ckpt/ . \
|
|
| xz -9 -T0 > /tmp/checkpoint.tar.xz
|
|
- run: |
|
|
mkdir -p ${{ github.workspace }}/tmp/
|
|
cp /tmp/train*/output_graph.* /tmp/checkpoint.tar.xz ${{ github.workspace }}/tmp/
|
|
- run: |
|
|
ls -hal /tmp/ ${{ github.workspace }}/tmp/
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ github.workspace }}/tmp/output_graph.tflite
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "test-checkpoint.${{ matrix.bitrate }}.zip"
|
|
path: ${{ github.workspace }}/tmp/checkpoint.tar.xz
|
|
tensorflow_opt-Linux:
|
|
name: "Lin|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "4"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-Linux:
|
|
name: "Lin|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-Linux
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends xz-utils
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
- name: Setup venv
|
|
run: |
|
|
/opt/python/cp37-cp37m/bin/python -m venv /tmp/venv
|
|
echo "/tmp/venv/bin" >> $GITHUB_PATH
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--linux-cpu"
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-Linux.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-Linux.outputs.status == 'missing'
|
|
build-lib_Linux:
|
|
name: "Lin|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-tensorflow-Linux, tensorflow_opt-Linux, libsox3_Linux]
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-Linux.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends xz-utils zip
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- name: Setup venv
|
|
run: |
|
|
/opt/python/cp37-cp37m/bin/python -m venv /tmp/venv
|
|
echo "/tmp/venv/bin" >> $GITHUB_PATH
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "libsox3_Linux"
|
|
path: ${{ github.workspace }}/sox-build/
|
|
- uses: ./.github/actions/libstt-build
|
|
- uses: ./.github/actions/package
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Linux.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.tflite.Linux.zip"
|
|
path: ${{ github.workspace }}/artifacts/libstt.zip
|
|
build-python-Linux:
|
|
name: "Lin|Build Python bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-lib_Linux, swig_Linux]
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
container:
|
|
image: quay.io/pypa/manylinux_2_24_x86_64:2021-07-25-cfe8a6c
|
|
volumes:
|
|
- ${{ github.workspace }}:${{ github.workspace }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Linux.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends xz-utils
|
|
- name: Extract native_client.tar.xz
|
|
run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- name: Setup venv
|
|
run: |
|
|
/opt/_internal/cpython-${{ matrix.python-version }}*/bin/python -m venv /tmp/venv-${{ matrix.python-version }}
|
|
echo "/tmp/venv-${{ matrix.python-version }}/bin" >> $GITHUB_PATH
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/python-build
|
|
with:
|
|
numpy_build: "${{ steps.get_numpy.outputs.build_version }}"
|
|
numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}"
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-Linux.whl"
|
|
path: ${{ github.workspace }}/native_client/python/dist/*.whl
|
|
build-nodejs-Linux:
|
|
name: "Lin|Build NodeJS and ElectronJS"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_Linux, swig_Linux ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Linux.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/cache@v2
|
|
id: node-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/nodejs/
|
|
key: node-headers-12.7.0_17.0.1
|
|
- uses: actions/cache@v2
|
|
id: electron-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/electronjs/
|
|
key: electron-headers-12.0.0_15.0.0
|
|
- uses: ./.github/actions/node-build
|
|
with:
|
|
nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0 17.0.1"
|
|
electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0"
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_amd64.tar.gz"
|
|
path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-Linux.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
test-cpp-Linux:
|
|
name: "Lin|Test C++ binary"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_Linux, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Linux.tar.xz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- run: |
|
|
cd ${{ env.CI_TMP_DIR }}
|
|
mkdir ds && cd ds && tar xf ../native_client.tar.xz
|
|
ls -lh
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "cpp"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-py-Linux:
|
|
name: "Lin|Test Python bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-python-Linux, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-Linux.whl"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
pip3 install --only-binary :all: --upgrade ${{ env.CI_TMP_DIR }}/stt*.whl
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "python"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-nodejs-Linux:
|
|
name: "Lin|Test NodeJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-nodejs-Linux, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 14, 16, 17]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-Linux.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
ls -hal node_modules/stt* node_modules/.bin/
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs-Linux:
|
|
name: "Lin|Test ElectronJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-nodejs-Linux, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 13.0.0, 14.0.0, 15.0.0]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-Linux.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
python-notebooks-tests:
|
|
name: "Lin|Python notebook tests"
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
- name: Run python notebooks
|
|
run: |
|
|
sudo apt-get install -y --no-install-recommends libopusfile0 libopus-dev libopusfile-dev
|
|
python -m pip install jupyter
|
|
./ci_scripts/notebook-tests.sh
|
|
training-basic-tests:
|
|
name: "Lin|Basic training tests"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-ctc-decoder-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
bitrate: [8k, 16k]
|
|
pyver: [3.6, 3.7]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.pyver }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-Linux-${{ matrix.pyver }}.whl"
|
|
- run: |
|
|
wget -O temp.zip https://github.com/coqui-ai/STT/releases/download/v0.9.3/convert_graphdef_memmapped_format.linux.amd64.zip
|
|
unzip temp.zip
|
|
rm temp.zip
|
|
chmod +x convert_graphdef_memmapped_format
|
|
mv convert_graphdef_memmapped_format /tmp
|
|
- run: |
|
|
mkdir -p ${CI_ARTIFACTS_DIR} || true
|
|
- name: Run basic training tests
|
|
run: |
|
|
python -m pip install coqui_stt_ctcdecoder-*.whl
|
|
./ci_scripts/train-tests.sh ${{ matrix.bitrate }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.pb
|
|
path: ${{ github.workspace }}/artifacts/output_graph.pb
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.pbmm
|
|
path: ${{ github.workspace }}/artifacts/output_graph.pbmm
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.tflite
|
|
path: ${{ github.workspace }}/artifacts/output_graph.tflite
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-checkpoint.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/checkpoint.tar.xz
|
|
training-extra-tests:
|
|
name: "Lin|Extra training tests"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-ctc-decoder-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
bitrate: [8k, 16k]
|
|
pyver: [3.6, 3.7]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.pyver }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-Linux-${{ matrix.pyver }}.whl"
|
|
- run: |
|
|
wget -O temp.zip https://github.com/coqui-ai/STT/releases/download/v0.9.3/convert_graphdef_memmapped_format.linux.amd64.zip
|
|
unzip temp.zip
|
|
rm temp.zip
|
|
chmod +x convert_graphdef_memmapped_format
|
|
mv convert_graphdef_memmapped_format /tmp
|
|
- run: |
|
|
mkdir -p ${CI_ARTIFACTS_DIR} || true
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends libopus0 sox
|
|
- name: Run extra training tests
|
|
run: |
|
|
python -m pip install coqui_stt_ctcdecoder-*.whl
|
|
./ci_scripts/train-extra-tests.sh ${{ matrix.bitrate }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.pb
|
|
path: ${{ github.workspace }}/artifacts/output_graph.pb
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.pbmm
|
|
path: ${{ github.workspace }}/artifacts/output_graph.pbmm
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-output_graph.tflite
|
|
path: ${{ github.workspace }}/artifacts/output_graph.tflite
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}-checkpoint.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/checkpoint.tar.xz
|
|
twine-upload-training:
|
|
name: "Upload STT training packages to PyPI"
|
|
runs-on: ubuntu-20.04
|
|
needs: [create-release]
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- name: Update pip and install deps
|
|
run: |
|
|
python -m pip install -U pip setuptools twine build
|
|
- run: |
|
|
python -m build
|
|
- name: Setup PyPI config
|
|
run: |
|
|
cat << EOF > ~/.pypirc
|
|
[pypi]
|
|
username=__token__
|
|
password=${{ secrets.PYPI_TRAINING_TOKEN }}
|
|
EOF
|
|
- run: |
|
|
twine upload --repository pypi dist/*
|
|
- name: Upload artifacts to GitHub release
|
|
uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "dist/*.whl"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
twine-upload-stt:
|
|
name: "Upload STT packages to PyPI"
|
|
runs-on: ubuntu-20.04
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
needs: [create-release, build-python-Linux, build-python-macOS, build-python-Windows, build-python-LinuxArmv7, build-python-LinuxAarch64]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- name: Update pip and install twine
|
|
run: |
|
|
python -m pip install -U pip
|
|
python -m pip install -U twine
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.6.8-macOS.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.7.9-macOS.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.8.9-macOS.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.9.4-macOS.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.6.8-Windows.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.7.9-Windows.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.8.8-Windows.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.9.4-Windows.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.6-Linux.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.7-Linux.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.8-Linux.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.9-Linux.whl
|
|
- name: Setup PyPI config
|
|
run: |
|
|
cat << EOF > ~/.pypirc
|
|
[pypi]
|
|
username=__token__
|
|
password=${{ secrets.PYPI_STT_TOKEN }}
|
|
EOF
|
|
- run: |
|
|
twine upload --repository pypi *.whl
|
|
# PyPI only supports ARM wheels built on manylinux images, but those aren't
|
|
# ready for use yet, so we upload our wheels to the corresponding release
|
|
# for this tag.
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.7-armv7.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite-3.7-aarch64.whl
|
|
- name: Upload artifacts to GitHub release
|
|
uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.whl"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
upload-nc-release-assets:
|
|
name: "Upload native client artifacts to release assets"
|
|
runs-on: ubuntu-20.04
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
needs: [create-release, build-lib_Windows, build-lib_Linux, build-lib_macOS, build-lib_LinuxAarch64, build-lib_LinuxArmv7]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: libstt.tflite.Linux.zip
|
|
- run: mv libstt.zip libstt.tflite.Linux.zip
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.Linux.tar.xz
|
|
- run: mv native_client.tar.xz native_client.tflite.Linux.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: libstt.tflite.macOS.zip
|
|
- run: mv libstt.zip libstt.tflite.macOS.zip
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.macOS.tar.xz
|
|
- run: mv native_client.tar.xz native_client.tflite.macOS.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: libstt.tflite.Windows.zip
|
|
- run: mv libstt.zip libstt.tflite.Windows.zip
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.Windows.tar.xz
|
|
- run: mv native_client.tar.xz native_client.tflite.Windows.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.linux.armv7.tar.xz
|
|
- run: mv native_client.tar.xz native_client.tflite.linux.armv7.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.linux.aarch64.tar.xz
|
|
- run: mv native_client.tar.xz native_client.tflite.linux.aarch64.tar.xz
|
|
- run: ls -lh
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.tar.xz"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.zip"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
docker-build:
|
|
name: "Build Dockerfile.build image"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
- name: Check VERSION matches Git tag and compute Docker tag
|
|
id: compute-tag
|
|
run: |
|
|
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" != "true" ]]; then
|
|
# PR build
|
|
echo "::set-output name=tag::dev"
|
|
else
|
|
VERSION="v$(cat VERSION)"
|
|
if [[ "${{ github.ref }}" != "refs/tags/${VERSION}" ]]; then
|
|
echo "Pushed tag does not match VERSION file. Aborting push."
|
|
exit 1
|
|
fi
|
|
echo "::set-output name=tag::${VERSION}"
|
|
fi
|
|
- name: Build
|
|
run: |
|
|
DOCKER_TAG="${{ steps.compute-tag.outputs.tag }}"
|
|
docker build -f Dockerfile.build . -t ghcr.io/coqui-ai/stt-build:latest -t "ghcr.io/coqui-ai/stt-build:${DOCKER_TAG}"
|
|
docker-publish:
|
|
name: "Build and publish Docker training image to GHCR"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Check VERSION matches Git tag and compute Docker tag
|
|
id: compute-tag
|
|
run: |
|
|
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" != "true" ]]; then
|
|
# PR build
|
|
echo "::set-output name=tag::dev"
|
|
else
|
|
VERSION="v$(cat VERSION)"
|
|
if [[ "${{ github.ref }}" != "refs/tags/${VERSION}" ]]; then
|
|
echo "Pushed tag does not match VERSION file. Aborting push."
|
|
exit 1
|
|
fi
|
|
echo "::set-output name=tag::${VERSION}"
|
|
fi
|
|
- name: Build
|
|
run: |
|
|
DOCKER_TAG="${{ steps.compute-tag.outputs.tag }}"
|
|
docker build -f Dockerfile.train . -t ghcr.io/coqui-ai/stt-train:latest -t "ghcr.io/coqui-ai/stt-train:${DOCKER_TAG}"
|
|
- name: Push
|
|
run: |
|
|
DOCKER_TAG="${{ steps.compute-tag.outputs.tag }}"
|
|
docker push "ghcr.io/coqui-ai/stt-train:${DOCKER_TAG}"
|
|
docker push ghcr.io/coqui-ai/stt-train:latest
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
twine-upload-decoder:
|
|
name: "Upload coqui_stt_ctcdecoder packages to PyPI"
|
|
runs-on: ubuntu-20.04
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
needs: [create-release, build-ctc-decoder-Linux, build-ctc-decoder-macos, build-ctc-decoder-windows]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- name: Update pip and install twine
|
|
run: |
|
|
python -m pip install -U pip
|
|
python -m pip install -U twine
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-Linux-3.6.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-Linux-3.7.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-Linux-3.8.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-Linux-3.9.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-macOS-3.6.8.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-macOS-3.7.9.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-macOS-3.8.9.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-macOS-3.9.4.whl
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: coqui_stt_ctcdecoder-windows-test.whl
|
|
- name: Setup PyPI config
|
|
run: |
|
|
cat << EOF > ~/.pypirc
|
|
[pypi]
|
|
username=__token__
|
|
password=${{ secrets.PYPI_DECODER_TOKEN }}
|
|
EOF
|
|
- run: |
|
|
twine upload --repository pypi *.whl
|
|
- name: Upload artifacts to GitHub release
|
|
uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.whl"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
npmjs-publish:
|
|
name: "Upload STT packages to npmjs.com"
|
|
runs-on: ubuntu-20.04
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
needs: [create-release, repackage-nodejs-allplatforms]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- name: Compute tag for npm from git tag
|
|
id: compute-npm-tag
|
|
run: |
|
|
if [ "${{ needs.create-release.outputs.is-prerelease }}" = "true" ]; then
|
|
echo ::set-output name=npm-tag::prerelease
|
|
else
|
|
echo ::set-output name=npm-tag::latest
|
|
fi
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: stt-tflite.tgz
|
|
path: ${{ github.workspace }}/
|
|
- run: |
|
|
npm publish --access=public --verbose ${{ github.workspace }}/stt-*.tgz --tag ${{ steps.compute-npm-tag.outputs.npm-tag }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- name: Upload artifacts to GitHub release
|
|
uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.tgz"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|
|
# macOS jobs
|
|
swig_macOS:
|
|
name: "Mac|Build SWIG"
|
|
runs-on: macos-10.15
|
|
env:
|
|
swig_hash: "90cdbee6a69d13b39d734083b9f91069533b0d7b"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: "swig/swig"
|
|
ref: ${{ env.swig_hash }}
|
|
- run: |
|
|
mkdir -p build-static/
|
|
- uses: actions/cache@v2
|
|
id: swig-build-cache
|
|
with:
|
|
path: build-static/
|
|
key: swig-${{ runner.os }}-${{ env.swig_hash }}
|
|
- run: |
|
|
brew install automake
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
curl -sSL https://github.com/coqui-ai/STT/releases/download/v0.10.0-alpha.7/pcre-8.43.tar.gz > pcre-8.43.tar.gz
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
./Tools/pcre-build.sh
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
sh autogen.sh
|
|
./configure \
|
|
--prefix=${{ github.workspace }}/build-static/ \
|
|
--program-prefix=ds-
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make -j
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- run: |
|
|
make install
|
|
if: steps.swig-build-cache.outputs.cache-hit != 'true'
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ github.job }}
|
|
path: ${{ github.workspace }}/build-static/
|
|
build-ctc-decoder-macos:
|
|
name: "Mac|Build CTC decoder Python package"
|
|
needs: [ swig_macOS ]
|
|
runs-on: macos-10.15
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6.8, 3.7.9, 3.8.9, 3.9.4]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/install-python-upstream
|
|
with:
|
|
version: ${{ matrix.python-version }}
|
|
- run: |
|
|
python --version
|
|
pip --version
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_macOS"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- name: Make decoder package
|
|
run: |
|
|
NUMPY_BUILD_VERSION="${{ steps.get_numpy.outputs.build_version }}" \
|
|
NUMPY_DEP_VERSION="${{ steps.get_numpy.outputs.dep_version }}" \
|
|
make -C native_client/ctcdecode/ \
|
|
NUM_PROCESSES=$(sysctl hw.ncpu |cut -d' ' -f2) \
|
|
bindings
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-macOS-${{ matrix.python-version }}.whl"
|
|
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
|
- run: |
|
|
make -C native_client/ctcdecode clean-keep-third-party
|
|
train-test-model-macOS:
|
|
name: "Mac|Train a test model"
|
|
needs: [ "build-ctc-decoder-macos" ]
|
|
runs-on: macos-10.15
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
bitrate: ["8k", "16k"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-macOS-3.7.9.whl"
|
|
- run: |
|
|
python --version
|
|
python -m pip --version
|
|
- run: |
|
|
python -m pip install -U pip setuptools wheel
|
|
- run: |
|
|
python -m pip install coqui_stt_ctcdecoder-*.whl
|
|
DS_NODECODER=y python -m pip install --upgrade .
|
|
- run: |
|
|
bits=""
|
|
if [ "${{ matrix.bitrate }}" = "8k" ]; then
|
|
bits=8000
|
|
fi
|
|
if [ "${{ matrix.bitrate }}" = "16k" ]; then
|
|
bits=16000
|
|
fi
|
|
|
|
# Easier to rename to that we can exercize the LDC93S1 importer code to
|
|
# generate the CSV file.
|
|
echo "Moving ${bits} to LDC93S1.wav"
|
|
mv data/smoke_test/LDC93S1_pcms16le_1_${bits}.wav data/smoke_test/LDC93S1.wav
|
|
|
|
./bin/run-ci-ldc93s1_new.sh 249 ${bits}
|
|
./bin/run-ci-ldc93s1_tflite.sh ${bits}
|
|
- run: |
|
|
wget -O temp.zip https://github.com/coqui-ai/STT/releases/download/v0.9.3/convert_graphdef_memmapped_format.macOS.amd64.zip
|
|
unzip temp.zip
|
|
rm temp.zip
|
|
chmod +x convert_graphdef_memmapped_format
|
|
./convert_graphdef_memmapped_format --in_graph=/tmp/train/output_graph.pb --out_graph=/tmp/train/output_graph.pbmm
|
|
- run: |
|
|
tar -cf - \
|
|
-C /tmp/ckpt/ . \
|
|
| xz -9 -T0 > /tmp/checkpoint.tar.xz
|
|
- run: |
|
|
mkdir -p ${{ github.workspace }}/tmp/
|
|
cp /tmp/train*/output_graph.* /tmp/checkpoint.tar.xz ${{ github.workspace }}/tmp/
|
|
- run: |
|
|
ls -hal /tmp/ ${{ github.workspace }}/tmp/
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ github.workspace }}/tmp/output_graph.tflite
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "test-checkpoint.${{ matrix.bitrate }}.zip"
|
|
path: ${{ github.workspace }}/tmp/checkpoint.tar.xz
|
|
tensorflow_opt-macOS:
|
|
name: "Mac|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "3"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-macOS:
|
|
name: "Mac|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-macOS
|
|
runs-on: macos-10.15
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- uses: ./.github/actions/select-xcode
|
|
with:
|
|
version: "12.1.1"
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- run: |
|
|
# Taken from https://www.tensorflow.org/install/source
|
|
# Only future is needed for our builds, as we don't build the Python package
|
|
python -m pip install -U --user future==0.17.1 || true
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--darwin-cpu"
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-macOS.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-macOS.outputs.status == 'missing'
|
|
build-lib_macOS:
|
|
name: "Mac|Build libstt+client"
|
|
runs-on: macos-10.15
|
|
needs: [ build-tensorflow-macOS, tensorflow_opt-macOS ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-macOS.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar xkf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- run: |
|
|
git status
|
|
- uses: ./.github/actions/select-xcode
|
|
with:
|
|
version: "12.1.1"
|
|
- run: |
|
|
# Taken from https://www.tensorflow.org/install/source
|
|
# Only future is needed for our builds, as we don't build the Python package
|
|
python -m pip install -U --user future==0.17.1 || true
|
|
- uses: ./.github/actions/libstt-build
|
|
- uses: ./.github/actions/package
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.macOS.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.tflite.macOS.zip"
|
|
path: ${{ github.workspace }}/artifacts/libstt.zip
|
|
build-python-macOS:
|
|
name: "Mac|Build Python bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ build-lib_macOS, swig_macOS ]
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6.8, 3.7.9, 3.8.9, 3.9.4]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.macOS.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_macOS"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: ./.github/actions/install-python-upstream
|
|
with:
|
|
version: ${{ matrix.python-version }}
|
|
# GitHub packaged version are limited to macOS deployment target 10.14
|
|
#- uses: actions/setup-python@v2
|
|
# with:
|
|
# python-version: ${{ matrix.python-version }}
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/python-build
|
|
with:
|
|
numpy_build: "${{ steps.get_numpy.outputs.build_version }}"
|
|
numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}"
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-macOS.whl"
|
|
path: ${{ github.workspace }}/native_client/python/dist/*.whl
|
|
build-nodejs-macOS:
|
|
name: "Mac|Build NodeJS and ElectronJS"
|
|
runs-on: macos-10.15
|
|
needs: [ build-lib_macOS, swig_macOS ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.macOS.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_macOS"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/cache@v2
|
|
id: node-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/nodejs/
|
|
key: node-headers-12.7.0_17.0.1
|
|
- uses: actions/cache@v2
|
|
id: electron-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/electronjs/
|
|
key: electron-headers-12.0.0_15.0.0
|
|
- uses: ./.github/actions/node-build
|
|
with:
|
|
nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0 17.0.1"
|
|
electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0"
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-macOS_amd64.tar.gz"
|
|
path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-macOS.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
test-cpp-macOS:
|
|
name: "Mac|Test C++ binary"
|
|
runs-on: macos-10.15
|
|
needs: [ build-lib_macOS, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.macOS.tar.xz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- run: |
|
|
cd ${{ env.CI_TMP_DIR }}
|
|
mkdir ds && cd ds && tar xf ../native_client.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "cpp"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-py-macOS:
|
|
name: "Mac|Test Python bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ build-python-macOS, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6.8, 3.7.9, 3.8.9, 3.9.4]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-macOS.whl"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
pip3 install --only-binary :all: --upgrade ${{ env.CI_TMP_DIR }}/stt*.whl
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "python"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-nodejs-macOS:
|
|
name: "Mac|Test NodeJS bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ build-nodejs-macOS, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 14, 16, 17]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-macOS.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
ls -hal node_modules/stt* node_modules/.bin/
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs-macOS:
|
|
name: "Mac|Test ElectronJS bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ build-nodejs-macOS, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 13.0.0, 14.0.0, 15.0.0]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-macOS.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
# Windows jobs
|
|
build-ctc-decoder-windows:
|
|
name: "Win|Build CTC decoder Python package"
|
|
needs: [swig_Windows_crosscompiled]
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
git
|
|
make
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7.9
|
|
- run: |
|
|
python --version
|
|
python -m pip --version
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Windows_crosscompiled"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Remove /usr/bin/link conflicting with MSVC link.exe
|
|
run: |
|
|
set -ex
|
|
which link
|
|
rm /usr/bin/link
|
|
- name: Remove mingw32-make conflicting with MSYS make
|
|
run: |
|
|
set -ex
|
|
which mingw32-make
|
|
rm /c/ProgramData/Chocolatey/bin/mingw32-make
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
set -ex
|
|
ls -hal native_client/ds-swig/bin
|
|
ln -s ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
chmod +x native_client/ds-swig/bin/ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
- run: |
|
|
make -C native_client/ctcdecode/ \
|
|
NUM_PROCESSES=$(nproc) \
|
|
bindings
|
|
- name: Setup tmate session
|
|
uses: mxschmitt/action-tmate@v3
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "coqui_stt_ctcdecoder-windows-test.whl"
|
|
path: ${{ github.workspace }}/native_client/ctcdecode/dist/*.whl
|
|
- run: |
|
|
make -C native_client/ctcdecode clean-keep-third-party
|
|
tensorflow_opt-Windows:
|
|
name: "Win|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "10"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-Windows:
|
|
name: "Win|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-Windows
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- run: true
|
|
shell: bash
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
git
|
|
patch
|
|
tar
|
|
unzip
|
|
zip
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7.9
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- name: Workaround bazel bug when LLVM is installed https://github.com/bazelbuild/bazel/issues/12144
|
|
run: |
|
|
rm -f /c/msys64/mingw64/clang-cl*
|
|
rm -rf "/c/Program Files/LLVM"
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- run: ./ci_scripts/tf-setup.sh
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- run: ./ci_scripts/tf-build.sh "--windows-cpu"
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- run: ./ci_scripts/tf-package.sh
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-Windows.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-Windows.outputs.status == 'missing'
|
|
build-lib_Windows:
|
|
name: "Win|Build libstt+client"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [build-tensorflow-Windows, tensorflow_opt-Windows]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
update: true
|
|
install: >-
|
|
git
|
|
make
|
|
patch
|
|
pkg-config
|
|
tar
|
|
unzip
|
|
zip
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-Windows.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
"C:/Program Files/7-Zip/7z.exe" x tf-cache.tar.xz -so | "C:/Program Files/7-Zip/7z.exe" x -aos -si -ttar -o`pwd`
|
|
rm tf-cache.tar.xz
|
|
- name: Workaround bazel bug when LLVM is installed https://github.com/bazelbuild/bazel/issues/12144
|
|
run: |
|
|
rm -f /c/msys64/mingw64/clang-cl*
|
|
rm -rf "/c/Program Files/LLVM"
|
|
- run: ./ci_scripts/host-build.sh
|
|
- run: ./ci_scripts/package.sh
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Windows.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.tflite.Windows.zip"
|
|
path: ${{ github.workspace }}/artifacts/libstt.zip
|
|
build-python-Windows:
|
|
name: "Win|Build Python bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [build-lib_Windows, swig_Windows_crosscompiled]
|
|
strategy:
|
|
matrix:
|
|
# Try to keep Python versions in sync with cached versions to speed things up:
|
|
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
|
|
python-version: [3.6.8, 3.7.9, 3.8.8, 3.9.4]
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
make
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Windows.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
pushd tensorflow/bazel-bin/native_client/
|
|
"C:/Program Files/7-Zip/7z.exe" x native_client.tar.xz -so | "C:/Program Files/7-Zip/7z.exe" x -aoa -si -ttar -o`pwd`
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so* ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
popd
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Windows_crosscompiled"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
set -ex
|
|
ls -hal native_client/ds-swig/bin
|
|
ln -s ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
chmod +x native_client/ds-swig/bin/ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Remove /usr/bin/link conflicting with MSVC link.exe
|
|
run: |
|
|
rm /usr/bin/link
|
|
- id: get_numpy
|
|
uses: ./.github/actions/win-numpy-vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/win-python-build
|
|
with:
|
|
numpy_build: "${{ steps.get_numpy.outputs.build_version }}"
|
|
numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}"
|
|
- name: Setup tmate session
|
|
uses: mxschmitt/action-tmate@v3
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-Windows.whl"
|
|
path: ${{ github.workspace }}/native_client/python/dist/*.whl
|
|
build-nodejs-Windows:
|
|
name: "Win|Build NodeJS/ElectronJS"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [build-lib_Windows, swig_Windows_crosscompiled]
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
make
|
|
tar
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Windows.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
pushd tensorflow/bazel-bin/native_client/
|
|
"C:/Program Files/7-Zip/7z.exe" x native_client.tar.xz -so | "C:/Program Files/7-Zip/7z.exe" x -aoa -si -ttar -o`pwd`
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so* ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
popd
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Windows_crosscompiled"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
set -ex
|
|
ls -hal native_client/ds-swig/bin
|
|
ln -s ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
chmod +x native_client/ds-swig/bin/ds-swig.exe native_client/ds-swig/bin/swig.exe
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/cache@v2
|
|
id: node-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/nodejs/
|
|
key: node-headers-win-12.7.0_16.0.0
|
|
- uses: actions/cache@v2
|
|
id: electron-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/electronjs/
|
|
key: electron-headers-win-12.0.0_15.0.0
|
|
- uses: ./.github/actions/win-node-build
|
|
with:
|
|
nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0"
|
|
electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0"
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Windows_amd64.tar.gz"
|
|
path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "STT_intermediate-tflite-Windows.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
test-cpp-Windows:
|
|
name: "Win|Test C++ binary"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [build-lib_Windows, train-test-model-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Download native_client.tar.xz
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.Windows.tar.xz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- name: Extract native_client.tar.xz
|
|
run: |
|
|
mkdir -p ${{ env.CI_TMP_DIR }}/ds
|
|
pushd ${{ env.CI_TMP_DIR }}/ds
|
|
"C:/Program Files/7-Zip/7z.exe" x ../native_client.tar.xz -so | "C:/Program Files/7-Zip/7z.exe" x -aoa -si -ttar -o`pwd`
|
|
ls -hal
|
|
popd
|
|
- name: Download trained test model
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-16k.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "cppwin"
|
|
bitrate: "16k"
|
|
model-kind: ""
|
|
test-py-Windows:
|
|
name: "Win|Test Python bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [ build-python-Windows, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# Try to keep Python versions in sync with cached versions to speed things up:
|
|
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
|
|
python-version: [3.6.8, 3.7.9, 3.8.8, 3.9.4]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/win-install-sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-Windows.whl"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
python -m pip install --only-binary :all: --upgrade ${{ env.CI_TMP_DIR }}/stt*.whl
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "python"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-nodejs-Windows:
|
|
name: "Win|Test NodeJS bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [ build-nodejs-Windows, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
nodejs-version: [12, 14, 16]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- uses: ./.github/actions/win-install-sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "STT_intermediate-tflite-Windows.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- name: Get npm cache directory
|
|
id: npm-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(npm config get cache)"
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs-Windows:
|
|
name: "Win|Test ElectronJS bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [ build-nodejs-Windows, train-test-model-Linux ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 13.0.0, 14.0.0, 15.0.0]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: ./.github/actions/win-install-sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "STT_intermediate-tflite-Windows.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Get npm cache directory
|
|
id: npm-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(npm config get cache)"
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
# Shared jobs (multi-platform dependencies)
|
|
repackage-nodejs-allplatforms:
|
|
name: "Repackage NodeJS / ElectronJS for multiplatforms"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-nodejs-macOS, build-nodejs-Windows, build-nodejs-Linux, build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- run: |
|
|
mkdir -p /tmp/nodewrapper-tflite-macOS_amd64/
|
|
mkdir -p /tmp/nodewrapper-tflite-Windows_amd64/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-macOS_amd64.tar.gz"
|
|
path: /tmp/nodewrapper-macOS_amd64/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Windows_amd64.tar.gz"
|
|
path: /tmp/nodewrapper-Windows_amd64/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_amd64.tar.gz"
|
|
path: /tmp/nodewrapper-Linux_amd64/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_armv7.tar.gz"
|
|
path: /tmp/nodewrapper-Linux_armv7/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_aarch64.tar.gz"
|
|
path: /tmp/nodewrapper-Linux_aarch64/
|
|
- name: Extract nodewrapper archives
|
|
run: |
|
|
tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-macOS_amd64/wrapper.tar.gz
|
|
tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Windows_amd64/wrapper.tar.gz
|
|
tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_amd64/wrapper.tar.gz
|
|
tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_armv7/wrapper.tar.gz
|
|
tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_aarch64/wrapper.tar.gz
|
|
- run: |
|
|
make -C native_client/javascript clean npm-pack PROJECT_NAME=stt
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
test-nodejs_all-Linux:
|
|
name: "Lin|Test MultiArchPlatform NodeJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [repackage-nodejs-allplatforms, train-test-model-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 17]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
ls -hal node_modules/stt* node_modules/.bin/
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs_all-Linux:
|
|
name: "Lin|Test MultiArchPlatform ElectronJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [repackage-nodejs-allplatforms, train-test-model-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 15.0.0]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
test-nodejs_all-macOS:
|
|
name: "Mac|Test MultiArchPlatform NodeJS bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ repackage-nodejs-allplatforms, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 17]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
ls -hal node_modules/stt* node_modules/.bin/
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs_all-macOS:
|
|
name: "Mac|Test MultiArchPlatform ElectronJS bindings"
|
|
runs-on: macos-10.15
|
|
needs: [ repackage-nodejs-allplatforms, train-test-model-macOS ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 15.0.0]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ~/.npm/
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
test-nodejs_all-Windows:
|
|
name: "Win|Test MultiArchPlatform NodeJS bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [repackage-nodejs-allplatforms, train-test-model-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 16]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.nodejs-version }}
|
|
- uses: ./.github/actions/win-install-sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- name: Get npm cache directory
|
|
id: npm-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(npm config get cache)"
|
|
- uses: actions/cache@v2
|
|
id: node-modules-cache
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: node-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "node"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs_all-Windows:
|
|
name: "Win|Test MultiArchPlatform ElectronJS bindings"
|
|
runs-on: windows-2019
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
needs: [repackage-nodejs-allplatforms, train-test-model-Linux]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
electronjs-version: [12.0.0, 15.0.0]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: tmp/
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: tmp/output_graph.pb
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
path-type: inherit
|
|
update: true
|
|
install: >-
|
|
vim
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: ./.github/actions/win-install-sox
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: Get npm cache directory
|
|
id: npm-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(npm config get cache)"
|
|
- uses: actions/cache@v2
|
|
id: electron-modules-cache
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: electron-modules-tflite-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
|
|
- name: Install STT package
|
|
run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
npm install electron@${{ matrix.electronjs-version }}
|
|
- uses: ./.github/actions/win-run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
# Linux Armv7 and Aarch64 jobs
|
|
tensorflow_opt-LinuxArmv7:
|
|
name: "LinArmv7|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7" ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "1"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
tensorflow_opt-LinuxAarch64:
|
|
name: "LinAarch64|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "aarch64" ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "1"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-LinuxArmv7:
|
|
name: "LinArmv7|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-LinuxArmv7
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--linux-armv7"
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-LinuxArmv7.outputs.status == 'missing'
|
|
build-tensorflow-LinuxAarch64:
|
|
name: "LinAarch64|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-LinuxAarch64
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--linux-aarch64"
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxAarch64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-LinuxAarch64.outputs.status == 'missing'
|
|
build-lib_LinuxArmv7:
|
|
name: "LinArmv7|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-tensorflow-LinuxArmv7, tensorflow_opt-LinuxArmv7 ]
|
|
env:
|
|
SYSTEM_TARGET: rpi3
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-raspbian-buster
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- run: |
|
|
git status
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: armv7
|
|
- uses: ./.github/actions/libstt-build
|
|
with:
|
|
arch: armv7
|
|
- uses: ./.github/actions/package
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.armv7.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.tflite.linux.armv7.zip"
|
|
path: ${{ github.workspace }}/artifacts/libstt.zip
|
|
build-lib_LinuxAarch64:
|
|
name: "LinAarch64|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-tensorflow-LinuxAarch64, tensorflow_opt-LinuxAarch64 ]
|
|
env:
|
|
SYSTEM_TARGET: rpi3-armv8
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-armbian64-buster
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxAarch64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- run: |
|
|
git status
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: aarch64
|
|
- uses: ./.github/actions/libstt-build
|
|
with:
|
|
arch: aarch64
|
|
- uses: ./.github/actions/package
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.aarch64.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.tflite.linux.aarch64.zip"
|
|
path: ${{ github.workspace }}/artifacts/libstt.zip
|
|
build-python-LinuxArmv7:
|
|
name: "LinArmv7|Build Python bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_LinuxArmv7, swig_Linux, tensorflow_opt-LinuxArmv7 ]
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.7]
|
|
env:
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
SYSTEM_TARGET: rpi3
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-raspbian-buster
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.armv7.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/install-xldd
|
|
with:
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: armv7
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -U pip setuptools wheel
|
|
- uses: ./.github/actions/python-build
|
|
with:
|
|
numpy_build: "${{ steps.get_numpy.outputs.build_version }}"
|
|
numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}"
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
chroot: ${{ env.SYSTEM_RASPBIAN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-armv7.whl"
|
|
path: ${{ github.workspace }}/native_client/python/dist/*.whl
|
|
build-nodejs-LinuxArmv7:
|
|
name: "LinArmv7|Build NodeJS and ElectronJS"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_LinuxArmv7, swig_Linux, tensorflow_opt-LinuxArmv7 ]
|
|
env:
|
|
SYSTEM_TARGET: rpi3
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-raspbian-buster
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.armv7.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: ./.github/actions/install-xldd
|
|
with:
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: armv7
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/cache@v2
|
|
id: node-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/nodejs/
|
|
key: node-headers-12.7.0_17.0.1
|
|
- uses: actions/cache@v2
|
|
id: electron-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/electronjs/
|
|
key: electron-headers-12.0.0_15.0.0
|
|
- uses: ./.github/actions/node-build
|
|
with:
|
|
nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0 17.0.1"
|
|
electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0"
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
chroot: ${{ env.SYSTEM_RASPBIAN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_armv7.tar.gz"
|
|
path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-armv7.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
build-python-LinuxAarch64:
|
|
name: "LinAarch64|Build Python bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_LinuxAarch64, swig_Linux, tensorflow_opt-LinuxAarch64 ]
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.7]
|
|
env:
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
SYSTEM_TARGET: rpi3-armv8
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-armbian64-buster
|
|
steps:
|
|
- run: |
|
|
sudo apt-get install -y --no-install-recommends
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.aarch64.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxAarch64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: ./.github/actions/install-xldd
|
|
with:
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: aarch64
|
|
- id: get_numpy
|
|
uses: ./.github/actions/numpy_vers
|
|
with:
|
|
pyver: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -U pip setuptools wheel
|
|
- uses: ./.github/actions/python-build
|
|
with:
|
|
numpy_build: "${{ steps.get_numpy.outputs.build_version }}"
|
|
numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}"
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
chroot: ${{ env.SYSTEM_RASPBIAN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-aarch64.whl"
|
|
path: ${{ github.workspace }}/native_client/python/dist/*.whl
|
|
build-nodejs-LinuxAarch64:
|
|
name: "LinAarch64|Build NodeJS and ElectronJS"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_LinuxAarch64, swig_Linux, tensorflow_opt-LinuxAarch64 ]
|
|
env:
|
|
SYSTEM_TARGET: rpi3-armv8
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-armbian64-buster
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.aarch64.tar.xz"
|
|
path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
- run: |
|
|
cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/
|
|
tar xf native_client.tar.xz
|
|
mkdir -p ../tensorflow/lite
|
|
mv libtensorflowlite.so ../tensorflow/lite/
|
|
ls -hal . ../tensorflow/lite
|
|
cd ${{ github.workspace }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "swig_Linux"
|
|
path: ${{ github.workspace }}/native_client/ds-swig/
|
|
- name: Link ds-swig into swig
|
|
run: |
|
|
ls -hal ${{ github.workspace }}/native_client/ds-swig/bin
|
|
ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-LinuxAarch64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: ./.github/actions/install-xldd
|
|
with:
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
- name: "Install chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: aarch64
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- uses: actions/cache@v2
|
|
id: node-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/nodejs/
|
|
key: node-headers-12.7.0_17.0.1
|
|
- uses: actions/cache@v2
|
|
id: electron-headers-cache
|
|
with:
|
|
path: native_client/javascript/headers/electronjs/
|
|
key: electron-headers-12.0.0_15.0.0
|
|
- uses: ./.github/actions/node-build
|
|
with:
|
|
nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0 17.0.1"
|
|
electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0"
|
|
target: ${{ env.SYSTEM_TARGET }}
|
|
chroot: ${{ env.SYSTEM_RASPBIAN }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "nodewrapper-tflite-Linux_aarch64.tar.gz"
|
|
path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-aarch64.tgz"
|
|
path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz
|
|
build-test-chroot:
|
|
name: "Lin|Build test chroot"
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7", "aarch64" ]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: "Install and setup chroot"
|
|
uses: ./.github/actions/multistrap
|
|
with:
|
|
arch: ${{ matrix.arch }}
|
|
packages: "bash wget curl sox xxd libatlas3-base libopenblas-base ca-certificates python3 python3-pip gnupg libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm1 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 xauth"
|
|
- name: "Create a chroot tarball"
|
|
run: |
|
|
sudo tar -cf - -C ${{ env.SYSTEM_RASPBIAN }}/ --one-file-system . | xz -9 -T0 > ${{ github.workspace }}/chroot.tar.xz
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: chroot-${{ matrix.arch }}
|
|
path: ${{ github.workspace }}/chroot.tar.xz
|
|
test-cpp-LinuxArm:
|
|
name: "LinArm*|Test C++ binary"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-lib_LinuxArmv7, build-lib_LinuxAarch64, train-test-model-Linux, build-test-chroot ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7", "aarch64" ]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }}
|
|
steps:
|
|
- name: "Install QEMU"
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y --no-install-recommends qemu-user-static
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "chroot-${{ matrix.arch }}"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- run: |
|
|
mkdir ${{ env.SYSTEM_RASPBIAN }}/
|
|
sudo tar -xf ${{ env.CI_TMP_DIR }}/chroot.tar.xz -C ${{ env.SYSTEM_RASPBIAN }}/
|
|
rm ${{ env.CI_TMP_DIR }}/chroot.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.linux.${{ matrix.arch }}.tar.xz"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- run: |
|
|
cd ${{ env.CI_TMP_DIR }}/
|
|
mkdir ds && cd ds && tar xf ../native_client.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- name: "Check tests"
|
|
run: |
|
|
file ${{ env.SYSTEM_RASPBIAN }}/${{ env.CI_TMP_DIR }}/ds/*
|
|
- uses: ./.github/actions/chroot-bind-mount
|
|
with:
|
|
mounts: "/dev"
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "cpp"
|
|
chroot: "sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ${{ github.workspace }}"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-py-LinuxArm:
|
|
name: "LinArm*|Test Python bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-python-LinuxArmv7, build-python-LinuxAarch64, train-test-model-Linux, build-test-chroot ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7", "aarch64" ]
|
|
python-version: [3.7]
|
|
models: ["test", "prod"]
|
|
bitrate: ["8k", "16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }}
|
|
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple https://lissyx.github.io/deepspeech-python-wheels/"
|
|
steps:
|
|
- name: "Install QEMU"
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y --no-install-recommends qemu-user-static
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "chroot-${{ matrix.arch }}"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- run: |
|
|
mkdir ${{ env.SYSTEM_RASPBIAN }}/
|
|
sudo tar -xf ${{ env.CI_TMP_DIR }}/chroot.tar.xz -C ${{ env.SYSTEM_RASPBIAN }}/
|
|
rm ${{ env.CI_TMP_DIR }}/chroot.tar.xz
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt-tflite-${{ matrix.python-version }}-${{ matrix.arch }}.whl"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: ./.github/actions/chroot-bind-mount
|
|
with:
|
|
mounts: "/dev"
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
ls -hal ${{ github.workspace }}/
|
|
ls -hal ${{ env.SYSTEM_RASPBIAN }}/${{ github.workspace }}/
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ pip3 install --only-binary :all: --upgrade ${{ env.CI_TMP_DIR }}/stt*.whl
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "python"
|
|
chroot: "sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ${{ github.workspace }}"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-nodejs-LinuxArm:
|
|
name: "LinArm*|Test NodeJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64, train-test-model-Linux, build-test-chroot ]
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7", "aarch64" ]
|
|
# https://nodejs.org/en/about/releases/
|
|
nodejs-version: [12, 14, 16, 17]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
fail-fast: false
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }}
|
|
steps:
|
|
- name: "Install QEMU"
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y --no-install-recommends qemu-user-static
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "chroot-${{ matrix.arch }}"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- run: |
|
|
mkdir ${{ env.SYSTEM_RASPBIAN }}/
|
|
sudo tar -xf ${{ env.CI_TMP_DIR }}/chroot.tar.xz -C ${{ env.SYSTEM_RASPBIAN }}/
|
|
rm ${{ env.CI_TMP_DIR }}/chroot.tar.xz
|
|
- name: "Install NodeJS"
|
|
uses: ./.github/actions/node-install
|
|
with:
|
|
node: ${{ matrix.nodejs-version }}
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-${{ matrix.arch }}.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: ./.github/actions/chroot-bind-mount
|
|
with:
|
|
mounts: "/dev"
|
|
- name: Install STT package
|
|
run: |
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ npm install --prefix ${{ github.workspace }}/ --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "node"
|
|
chroot: "sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ${{ github.workspace }}"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
test-electronjs-LinuxArm:
|
|
name: "LinArm*|Test ElectronJS bindings"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64, train-test-model-Linux, build-test-chroot ]
|
|
# Disable this task because it seems qemu does not work super-well with ElectronJS
|
|
if: ${{ github.event_name == 'disabled' }}
|
|
strategy:
|
|
matrix:
|
|
arch: [ "armv7", "aarch64" ]
|
|
electronjs-version: [12.0.0, 13.0.0, 14.0.0, 15.0.0]
|
|
models: ["test"]
|
|
bitrate: ["16k"]
|
|
env:
|
|
CI_TMP_DIR: ${{ github.workspace }}/tmp
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb
|
|
STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm
|
|
STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb
|
|
SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }}
|
|
DISPLAY: ":99.0"
|
|
steps:
|
|
- name: "Install QEMU"
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y --no-install-recommends qemu-user-static xvfb xauth
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "chroot-${{ matrix.arch }}"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- run: |
|
|
mkdir ${{ env.SYSTEM_RASPBIAN }}/
|
|
sudo tar -xf ${{ env.CI_TMP_DIR }}/chroot.tar.xz -C ${{ env.SYSTEM_RASPBIAN }}/
|
|
rm ${{ env.CI_TMP_DIR }}/chroot.tar.xz
|
|
- name: "Install NodeJS"
|
|
uses: ./.github/actions/node-install
|
|
with:
|
|
node: 12
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "stt_intermediate-tflite-${{ matrix.arch }}.tgz"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "test-model.tflite-${{ matrix.bitrate }}.zip"
|
|
path: ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- run: |
|
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
|
if: matrix.models == 'test'
|
|
- uses: ./.github/actions/chroot-bind-mount
|
|
with:
|
|
mounts: "/dev /proc /sys /run"
|
|
- name: Install STT package
|
|
run: |
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ npm install --prefix ${{ github.workspace }}/ ${{ env.CI_TMP_DIR }}/stt*.tgz
|
|
- run: |
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ npm install --prefix ${{ github.workspace }}/ electron@${{ matrix.electronjs-version }}
|
|
- name: "Fake X display"
|
|
run: |
|
|
sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
|
xvfb_process=$!
|
|
echo $xvfb_process > ${{ env.CI_TMP_DIR }}/xvfb.pid
|
|
cat ${{ env.CI_TMP_DIR }}/xvfb.pid
|
|
- name: "Debug missing libs"
|
|
run: |
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ls -hal ${{ github.workspace }}/node_modules/electron/dist/electron
|
|
sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ldd ${{ github.workspace }}/node_modules/electron/dist/electron
|
|
- uses: ./.github/actions/run-tests
|
|
with:
|
|
runtime: "electronjs"
|
|
chroot: "sudo --preserve-env chroot --userspec=runner:docker ${{ env.SYSTEM_RASPBIAN }}/ ${{ github.workspace }}"
|
|
bitrate: ${{ matrix.bitrate }}
|
|
model-kind: ${{ matrix.models }}
|
|
timeout-minutes: 5
|
|
- name: "Kill X"
|
|
run: |
|
|
cat ${{ env.CI_TMP_DIR }}/xvfb.pid
|
|
sudo kill -9 $(cat ${{ env.CI_TMP_DIR }}/xvfb.pid)
|
|
# Android jobs
|
|
tensorflow_opt-AndroidArmv7:
|
|
name: "AndroidArmv7|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "1"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-AndroidArmv7:
|
|
name: "AndroidArmv7|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-AndroidArmv7
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
- name: Use Java 8 instead of Java 11
|
|
run: echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
with:
|
|
flavor: "--android-armv7"
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--android-armv7"
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-AndroidArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-AndroidArmv7.outputs.status == 'missing'
|
|
build-lib_AndroidArmv7:
|
|
name: "AndroidArmv7|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-tensorflow-AndroidArmv7, tensorflow_opt-AndroidArmv7 ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-AndroidArmv7.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: ./.github/actions/libstt-build
|
|
with:
|
|
arch: android-armv7
|
|
- run: ./ci_scripts/android-package.sh armeabi-v7a
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.android.armv7.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
tensorflow_opt-AndroidArm64:
|
|
name: "AndroidArm64|Check TensorFlow cache"
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
status: ${{ steps.check_artifact_exists.outputs.status }}
|
|
cache_key: ${{ steps.get_cache_key.outputs.key }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- id: get_cache_key
|
|
uses: ./.github/actions/get_cache_key
|
|
with:
|
|
extras: "1"
|
|
- id: check_artifact_exists
|
|
uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ steps.get_cache_key.outputs.key }}.tar.xz
|
|
build-tensorflow-AndroidArm64:
|
|
name: "AndroidArm64|Build TensorFlow (opt)"
|
|
needs: tensorflow_opt-AndroidArm64
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- run: true
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'found'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
- name: Use Java 8 instead of Java 11
|
|
run: echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/setup-tensorflow
|
|
with:
|
|
flavor: "--android-arm64"
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/build-tensorflow
|
|
with:
|
|
flavor: "--android-arm64"
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/package-tensorflow
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-AndroidArm64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/artifacts/home.tar.xz
|
|
if: needs.tensorflow_opt-AndroidArm64.outputs.status == 'missing'
|
|
build-lib_AndroidArm64:
|
|
name: "AndroidArm64|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-tensorflow-AndroidArm64, tensorflow_opt-AndroidArm64 ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-AndroidArm64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: ./.github/actions/libstt-build
|
|
with:
|
|
arch: android-arm64
|
|
- run: ./ci_scripts/android-package.sh arm64-v8a
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.android.arm64.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
build-lib_Androidx86_64:
|
|
name: "Androidx86_64|Build libstt+client"
|
|
runs-on: ubuntu-20.04
|
|
needs: [ build-tensorflow-AndroidArm64, tensorflow_opt-AndroidArm64 ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./.github/actions/check_artifact_exists
|
|
with:
|
|
name: ${{ needs.tensorflow_opt-AndroidArm64.outputs.cache_key }}.tar.xz
|
|
path: ${{ github.workspace }}/tf-cache.tar.xz
|
|
download: true
|
|
- run: |
|
|
tar --skip-old-files -xf tf-cache.tar.xz
|
|
rm tf-cache.tar.xz
|
|
- uses: ./.github/actions/libstt-build
|
|
with:
|
|
arch: android-x86_64
|
|
- run: ./ci_scripts/android-package.sh x86_64
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "native_client.tflite.android.x86_64.tar.xz"
|
|
path: ${{ github.workspace }}/artifacts/native_client.tar.xz
|
|
build-android-apk-aar:
|
|
name: "Android|Build AAR+APK"
|
|
runs-on: ubuntu-20.04
|
|
needs: [build-lib_AndroidArmv7, build-lib_AndroidArm64, build-lib_Androidx86_64]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.android.armv7.tar.xz
|
|
path: /tmp/nc
|
|
- run: |
|
|
mkdir -p native_client/java/libstt/libs/armeabi-v7a
|
|
cd /tmp/nc
|
|
tar xvf native_client.tar.xz
|
|
mv libstt.so libtensorflowlite.so libkenlm.so libtflitedelegates.so ${CI_TASK_DIR}/native_client/java/libstt/libs/armeabi-v7a/
|
|
rm -f *
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.android.arm64.tar.xz
|
|
path: /tmp/nc
|
|
- run: |
|
|
mkdir -p native_client/java/libstt/libs/arm64-v8a
|
|
cd /tmp/nc
|
|
tar xvf native_client.tar.xz
|
|
mv libstt.so libtensorflowlite.so libkenlm.so libtflitedelegates.so ${CI_TASK_DIR}/native_client/java/libstt/libs/arm64-v8a/
|
|
rm -f *
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: native_client.tflite.android.x86_64.tar.xz
|
|
path: /tmp/nc
|
|
- run: |
|
|
mkdir -p native_client/java/libstt/libs/x86_64
|
|
cd /tmp/nc
|
|
tar xvf native_client.tar.xz
|
|
mv libstt.so libtensorflowlite.so libkenlm.so libtflitedelegates.so ${CI_TASK_DIR}/native_client/java/libstt/libs/x86_64/
|
|
rm -f *
|
|
- name: Use Java 8 instead of Java 11
|
|
run: echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
|
|
# This particular version of CMake confuses Gradle by not being semver.
|
|
# We're fine with 3.10.2 which is also installed. Keep an eye on the
|
|
# virtual environments though:
|
|
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#android
|
|
- name: Remove CMake 3.18.1-g262b901
|
|
run: |
|
|
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall 'cmake;3.18.1'
|
|
- run: |
|
|
make GRADLE="./gradlew " -C native_client/java
|
|
- run: |
|
|
make GRADLE="./gradlew " -C native_client/java maven-bundle
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "app.apk"
|
|
path: ${{ github.workspace }}/native_client/java/app/build/outputs/apk/release/app*.apk
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.aar"
|
|
path: ${{ github.workspace }}/native_client/java/libstt/build/outputs/aar/libstt*.aar
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: "libstt.maven.zip"
|
|
path: ${{ github.workspace }}/native_client/java/libstt/build/libstt-*.maven.zip
|
|
publish-android-aar:
|
|
name: "Android|Publish AAR"
|
|
runs-on: ubuntu-20.04
|
|
needs: [create-release, build-android-apk-aar]
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: "libstt.aar"
|
|
path: ${{ github.workspace }}/
|
|
- run: ls -lh
|
|
- uses: ./.github/actions/upload-release-asset
|
|
with:
|
|
name: '' # use filename
|
|
path: "*.aar"
|
|
release-tag: ${{ needs.create-release.outputs.release-tag }}
|