workflow.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: workflow
  2. on: push
  3. jobs:
  4. build:
  5. strategy:
  6. matrix:
  7. os: [ubuntu-latest, windows-latest]
  8. include:
  9. - os: ubuntu-latest
  10. deepspeech-os: linux
  11. toolchain: ''
  12. - os: windows-latest
  13. deepspeech-os: win
  14. toolchain: -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
  15. runs-on: ${{matrix.os}}
  16. env:
  17. BUILD_TYPE: Release
  18. DEEPSPEECH_URL: https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/native_client.amd64.cpu.${{matrix.deepspeech-os}}.tar.xz
  19. steps:
  20. - uses: actions/checkout@v2
  21. - name: Install Lua
  22. if: ${{matrix.os == 'ubuntu-latest'}}
  23. run: sudo apt install liblua5.1-dev
  24. - name: Install Lua
  25. if: ${{matrix.os == 'windows-latest'}}
  26. run: vcpkg install lua
  27. - name: Create Build Environment
  28. run: cmake -E make_directory ${{github.workspace}}/build ${{github.workspace}}/build/deepspeech
  29. - name: Download DeepSpeech
  30. shell: bash
  31. working-directory: ${{github.workspace}}/build/deepspeech
  32. run: curl -sL ${DEEPSPEECH_URL} | tar xJ
  33. - name: Configure CMake
  34. working-directory: ${{github.workspace}}/build
  35. run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDEEPSPEECH_PATH=${{github.workspace}}/build/deepspeech ${{matrix.toolchain}}
  36. - name: Build
  37. working-directory: ${{github.workspace}}/build
  38. run: cmake --build . --config $BUILD_TYPE