|
@@ -1,101 +0,0 @@
|
|
|
-name: linux-macos-windows
|
|
|
-
|
|
|
-on:
|
|
|
- push:
|
|
|
- branches:
|
|
|
- - master
|
|
|
- paths:
|
|
|
- - '.github/workflows/linux-macos-windows.yaml'
|
|
|
- - '.github/scripts/run-test.sh'
|
|
|
- - 'CMakeLists.txt'
|
|
|
- - 'cmake/**'
|
|
|
- - 'sherpa-ncnn/csrc/*'
|
|
|
- pull_request:
|
|
|
- branches:
|
|
|
- - master
|
|
|
- paths:
|
|
|
- - '.github/workflows/linux-macos-windows.yaml'
|
|
|
- - '.github/scripts/run-test.sh'
|
|
|
- - 'CMakeLists.txt'
|
|
|
- - 'cmake/**'
|
|
|
- - 'sherpa-ncnn/csrc/*'
|
|
|
-
|
|
|
-concurrency:
|
|
|
- group: linux-macos-windows-${{ github.ref }}
|
|
|
- cancel-in-progress: true
|
|
|
-
|
|
|
-permissions:
|
|
|
- contents: read
|
|
|
-
|
|
|
-jobs:
|
|
|
- linux_macos_windows:
|
|
|
- runs-on: ${{ matrix.os }}
|
|
|
- strategy:
|
|
|
- fail-fast: false
|
|
|
- matrix:
|
|
|
- os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
-
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v2
|
|
|
- with:
|
|
|
- fetch-depth: 0
|
|
|
-
|
|
|
- # see https://github.com/microsoft/setup-msbuild
|
|
|
- - name: Add msbuild to PATH
|
|
|
- if: startsWith(matrix.os, 'windows')
|
|
|
- uses: microsoft/setup-msbuild@v1.0.2
|
|
|
-
|
|
|
- - name: Configure CMake
|
|
|
- shell: bash
|
|
|
- run: |
|
|
|
- mkdir build
|
|
|
- cd build
|
|
|
- cmake -D CMAKE_BUILD_TYPE=Release ..
|
|
|
-
|
|
|
- - name: Build sherpa for ubuntu/macos
|
|
|
- if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
|
|
- run: |
|
|
|
- cd build
|
|
|
- make -j2
|
|
|
-
|
|
|
- ls -lh lib
|
|
|
- ls -lh bin
|
|
|
-
|
|
|
- ls -lh bin/sherpa-ncnn
|
|
|
- file bin/sherpa-ncnn
|
|
|
-
|
|
|
- ls -lh bin/sherpa-ncnn-microphone
|
|
|
- file bin/sherpa-ncnn-microphone
|
|
|
-
|
|
|
- - name: Upload binary sherpa-ncnn and sherpa-ncnn-micrphone
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
- if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
|
|
- with:
|
|
|
- name: sherpa-ncnn-pre-built-binaries-os-${{ matrix.os }}
|
|
|
- path: ./build/bin
|
|
|
-
|
|
|
- - name: Run tests for ubuntu/macos
|
|
|
- if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
|
|
- run: |
|
|
|
- export PATH=$PWD/build/bin:$PATH
|
|
|
- export EXE=sherpa-ncnn
|
|
|
-
|
|
|
- .github/scripts/run-test.sh
|
|
|
-
|
|
|
- - name: Build sherpa for windows
|
|
|
- if: startsWith(matrix.os, 'windows')
|
|
|
- shell: bash
|
|
|
- run: |
|
|
|
- cd build
|
|
|
- cmake --build . --config Release -- -m:2
|
|
|
-
|
|
|
- ls -lh ./bin/Release/sherpa-ncnn.exe
|
|
|
-
|
|
|
- - name: Run tests for windows
|
|
|
- if: startsWith(matrix.os, 'windows')
|
|
|
- shell: bash
|
|
|
- run: |
|
|
|
- export PATH=$PWD/build/bin/Release:$PATH
|
|
|
- export EXE=sherpa-ncnn.exe
|
|
|
-
|
|
|
- .github/scripts/run-test.sh
|