Skip to content

Update wave-reader.cc (#356) #257

Update wave-reader.cc (#356)

Update wave-reader.cc (#356) #257

Workflow file for this run

name: macos
on:
push:
branches:
- master
paths:
- '.github/workflows/macos.yaml'
- '.github/scripts/run-test.sh'
- '.github/scripts/test-vad.sh'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-ncnn/csrc/*'
pull_request:
branches:
- master
paths:
- '.github/workflows/macos.yaml'
- '.github/scripts/run-test.sh'
- '.github/scripts/test-vad.sh'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-ncnn/csrc/*'
workflow_dispatch:
concurrency:
group: macos-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-13]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-macos
- name: Configure CMake
shell: bash
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
- name: Build sherpa-ncnn for macos
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cd build
make -j2
ls -lh lib
ls -lh bin
ls -lh bin/sherpa-ncnn
file bin/sherpa-ncnn
ls -lh bin/sherpa-ncnn-vad
file bin/sherpa-ncnn-vad
ls -lh bin/sherpa-ncnn-microphone
file bin/sherpa-ncnn-microphone
ls -lh bin/decode-file-c-api
file bin/decode-file-c-api
- name: Upload binary sherpa-ncnn and sherpa-ncnn-microphone
uses: actions/upload-artifact@v2
with:
name: sherpa-ncnn-pre-built-binaries-os-${{ matrix.os }}
path: ./build/bin
- name: Test vad
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-ncnn-vad
.github/scripts/test-vad.sh
- name: Test sherpa-ncnn
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-ncnn
.github/scripts/run-test.sh
- name: Test C API
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=decode-file-c-api
.github/scripts/run-test.sh