88
.github/workflows/windows-x86.yaml
vendored
Normal file
88
.github/workflows/windows-x86.yaml
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
name: windows-x86
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/windows-x86.yaml'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/windows-x86.yaml'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
|
||||
concurrency:
|
||||
group: windows-x86-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
windows_x86:
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.vs-version }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- vs-version: vs2015
|
||||
toolset-version: v140
|
||||
os: windows-2019
|
||||
|
||||
- vs-version: vs2017
|
||||
toolset-version: v141
|
||||
os: windows-2019
|
||||
|
||||
- vs-version: vs2019
|
||||
toolset-version: v142
|
||||
os: windows-2022
|
||||
|
||||
- vs-version: vs2022
|
||||
toolset-version: v143
|
||||
os: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T ${{ matrix.toolset-version}},host=x64 -A Win32 -D CMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build sherpa-onnx for windows
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config Release -- -m:2
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test sherpa-onnx for Windows x86
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export EXE=sherpa-onnx.exe
|
||||
|
||||
.github/scripts/test-online-transducer.sh
|
||||
|
||||
- name: Test online transducer (C API)
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export EXE=decode-file-c-api.exe
|
||||
|
||||
.github/scripts/test-online-transducer.sh
|
||||
@@ -17,7 +17,7 @@ function(download_asio)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(asio_URL "file://${f}")
|
||||
set(asio_URL "${f}")
|
||||
set(asio_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -17,7 +17,7 @@ function(download_googltest)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(googletest_URL "file://${f}")
|
||||
set(googletest_URL "${f}")
|
||||
set(googletest_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -21,7 +21,7 @@ function(download_kaldi_native_fbank)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(kaldi_native_fbank_URL "file://${f}")
|
||||
set(kaldi_native_fbank_URL "${f}")
|
||||
set(kaldi_native_fbank_URL2 )
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -52,10 +52,12 @@ function(download_onnxruntime)
|
||||
# ./include
|
||||
# It contains all the needed header files
|
||||
elseif(WIN32)
|
||||
# If you don't have access to the Internet,
|
||||
# please pre-download onnxruntime
|
||||
message(STATUS "CMAKE_VS_PLATFORM_NAME: ${CMAKE_VS_PLATFORM_NAME}")
|
||||
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL Win32)
|
||||
# If you don't have access to the Internet,
|
||||
# please pre-download onnxruntime
|
||||
#
|
||||
# for 32-bit windows
|
||||
set(possible_file_locations
|
||||
$ENV{HOME}/Downloads/onnxruntime-win-x86-1.14.0.zip
|
||||
@@ -68,6 +70,9 @@ function(download_onnxruntime)
|
||||
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-win-x86-1.14.0.zip")
|
||||
set(onnxruntime_HASH "SHA256=4214b130db602cbf31a6f26f25377ab077af0cf03c4ddd4651283e1fb68f56cf")
|
||||
else()
|
||||
# If you don't have access to the Internet,
|
||||
# please pre-download onnxruntime
|
||||
#
|
||||
# for 64-bit windows
|
||||
set(possible_file_locations
|
||||
$ENV{HOME}/Downloads/onnxruntime-win-x64-1.14.0.zip
|
||||
@@ -94,7 +99,7 @@ function(download_onnxruntime)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(onnxruntime_URL "file://${f}")
|
||||
set(onnxruntime_URL "${f}")
|
||||
set(onnxruntime_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -18,7 +18,7 @@ function(download_portaudio)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(portaudio_URL "file://${f}")
|
||||
set(portaudio_URL "${f}")
|
||||
set(portaudio_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -17,7 +17,7 @@ function(download_pybind11)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(pybind11_URL "file://${f}")
|
||||
set(pybind11_URL "${f}")
|
||||
set(pybind11_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
@@ -18,7 +18,7 @@ function(download_websocketpp)
|
||||
|
||||
foreach(f IN LISTS possible_file_locations)
|
||||
if(EXISTS ${f})
|
||||
set(websocketpp_URL "file://${f}")
|
||||
set(websocketpp_URL "${f}")
|
||||
set(websocketpp_URL2)
|
||||
break()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user