@@ -1675,7 +1675,7 @@ jobs:
16751675 repackage-nodejs-allplatforms :
16761676 name : " Repackage NodeJS / ElectronJS for multiplatforms"
16771677 runs-on : ubuntu-20.04
1678- needs : [build-nodejs-macOS, build-nodejs-Windows]
1678+ needs : [build-nodejs-macOS, build-nodejs-Windows, build-nodejs-Linux ]
16791679 strategy :
16801680 matrix :
16811681 build-flavor : ["tf", "tflite"]
@@ -1694,10 +1694,15 @@ jobs:
16941694 with :
16951695 name : " nodewrapper-${{ matrix.build-flavor }}-Windows_amd64.tar.gz"
16961696 path : /tmp/nodewrapper-Windows_amd64/
1697+ - uses : actions/download-artifact@v2
1698+ with :
1699+ name : " nodewrapper-${{ matrix.build-flavor }}-Linux_amd64.tar.gz"
1700+ path : /tmp/nodewrapper-Linux_amd64/
16971701 - name : Extract nodewrapper archives
16981702 run : |
16991703 tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-macOS_amd64/wrapper.tar.gz
17001704 tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Windows_amd64/wrapper.tar.gz
1705+ tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_amd64/wrapper.tar.gz
17011706 - run : |
17021707 PROJECT_NAME="deepspeech"
17031708 if [ "${{ matrix.build-flavor }}" = "tflite" ]; then
@@ -1708,6 +1713,118 @@ jobs:
17081713 with :
17091714 name : " deepspeech-${{ matrix.build-flavor }}.tgz"
17101715 path : ${{ github.workspace }}/native_client/javascript/deepspeech-*.tgz
1716+ test-nodejs_all-Linux :
1717+ name : " Lin|Test MultiArchPlatform NodeJS bindings"
1718+ runs-on : ubuntu-20.04
1719+ needs : [repackage-nodejs-allplatforms, train-test-model-Linux]
1720+ if : ${{ github.event_name == 'pull_request' }}
1721+ strategy :
1722+ matrix :
1723+ # https://nodejs.org/en/about/releases/
1724+ nodejs-version : [10, 15]
1725+ build-flavor : ["tf", "tflite"]
1726+ models : ["test", "prod"]
1727+ bitrate : ["8k", "16k"]
1728+ env :
1729+ CI_TMP_DIR : ${{ github.workspace }}/tmp/
1730+ DEEPSPEECH_PROD_MODEL : https://github.com/reuben/DeepSpeech/releases/download/v0.7.0-alpha.3/output_graph.pb
1731+ DEEPSPEECH_PROD_MODEL_MMAP : https://github.com/reuben/DeepSpeech/releases/download/v0.7.0-alpha.3/output_graph.pbmm
1732+ DEEPSPEECH_TEST_MODEL : ${{ github.workspace }}/tmp/output_graph.pb
1733+ EXPECTED_TENSORFLOW_VERSION : " TensorFlow: v2.3.0-6-g23ad988"
1734+ steps :
1735+ - uses : actions/checkout@v2
1736+ with :
1737+ fetch-depth : 1
1738+ - uses : actions/setup-node@v2
1739+ with :
1740+ node-version : ${{ matrix.nodejs-version }}
1741+ - run : |
1742+ sudo apt-get install -y --no-install-recommends sox
1743+ - uses : actions/download-artifact@v2
1744+ with :
1745+ name : " deepspeech-${{ matrix.build-flavor }}.tgz"
1746+ path : ${{ env.CI_TMP_DIR }}
1747+ - uses : actions/download-artifact@v2
1748+ with :
1749+ name : " test-model.${{ matrix.build-flavor }}-${{ matrix.bitrate }}.zip"
1750+ path : ${{ env.CI_TMP_DIR }}
1751+ if : matrix.models == 'test'
1752+ - uses : actions/cache@v2
1753+ id : node-modules-cache
1754+ with :
1755+ path : ~/.npm/
1756+ key : node-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
1757+ - run : |
1758+ ls -hal ${{ env.CI_TMP_DIR }}/
1759+ if: matrix.models == 'test'
1760+ - name : Install deepspeech package
1761+ run : |
1762+ ls -hal ${{ env.CI_TMP_DIR }}/
1763+ npm install --verbose ${{ env.CI_TMP_DIR }}/deepspeech*.tgz
1764+ - run : |
1765+ ls -hal node_modules/deepspeech* node_modules/.bin/
1766+ - uses : ./.github/actions/run-tests
1767+ with :
1768+ runtime : " node"
1769+ build-flavor : ${{ matrix.build-flavor }}
1770+ bitrate : ${{ matrix.bitrate }}
1771+ model-kind : ${{ matrix.models }}
1772+ test-electronjs_all-Linux :
1773+ name : " Lin|Test MultiArchPlatform ElectronJS bindings"
1774+ runs-on : ubuntu-20.04
1775+ needs : [repackage-nodejs-allplatforms, train-test-model-Linux]
1776+ if : ${{ github.event_name == 'pull_request' }}
1777+ strategy :
1778+ matrix :
1779+ electronjs-version : [5.0.13, 12.0.0]
1780+ build-flavor : ["tf", "tflite"]
1781+ models : ["test", "prod"]
1782+ bitrate : ["8k", "16k"]
1783+ env :
1784+ CI_TMP_DIR : ${{ github.workspace }}/tmp/
1785+ DEEPSPEECH_PROD_MODEL : https://github.com/reuben/DeepSpeech/releases/download/v0.7.0-alpha.3/output_graph.pb
1786+ DEEPSPEECH_PROD_MODEL_MMAP : https://github.com/reuben/DeepSpeech/releases/download/v0.7.0-alpha.3/output_graph.pbmm
1787+ DEEPSPEECH_TEST_MODEL : ${{ github.workspace }}/tmp/output_graph.pb
1788+ EXPECTED_TENSORFLOW_VERSION : " TensorFlow: v2.3.0-6-g23ad988"
1789+ steps :
1790+ - uses : actions/checkout@v2
1791+ with :
1792+ fetch-depth : 1
1793+ - uses : actions/setup-node@v2
1794+ with :
1795+ node-version : 12
1796+ - run : |
1797+ sudo apt-get install -y --no-install-recommends sox
1798+ - uses : actions/download-artifact@v2
1799+ with :
1800+ name : " deepspeech-${{ matrix.build-flavor }}.tgz"
1801+ path : ${{ env.CI_TMP_DIR }}
1802+ - uses : actions/download-artifact@v2
1803+ with :
1804+ name : " test-model.${{ matrix.build-flavor }}-${{ matrix.bitrate }}.zip"
1805+ path : ${{ env.CI_TMP_DIR }}
1806+ if : matrix.models == 'test'
1807+ - run : |
1808+ ls -hal ${{ env.CI_TMP_DIR }}/
1809+ if: matrix.models == 'test'
1810+ - uses : actions/cache@v2
1811+ id : electron-modules-cache
1812+ with :
1813+ path : ~/.npm/
1814+ key : electron-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }}
1815+ - name : Install deepspeech package
1816+ run : |
1817+ ls -hal ${{ env.CI_TMP_DIR }}/
1818+ npm install ${{ env.CI_TMP_DIR }}/deepspeech*.tgz
1819+ - run : |
1820+ npm install electron@${{ matrix.electronjs-version }}
1821+ - uses : ./.github/actions/run-tests
1822+ with :
1823+ runtime : " electronjs"
1824+ build-flavor : ${{ matrix.build-flavor }}
1825+ bitrate : ${{ matrix.bitrate }}
1826+ model-kind : ${{ matrix.models }}
1827+ timeout-minutes : 5
17111828 test-nodejs_all-macOS :
17121829 name : " Mac|Test MultiArchPlatform NodeJS bindings"
17131830 runs-on : macos-10.15
0 commit comments