Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'runtime/**'
- '.github/workflows/runtime.yml'
- "runtime/**"
- ".github/workflows/runtime.yml"

jobs:
build:
Expand All @@ -18,5 +18,34 @@ jobs:
- uses: actions/checkout@v4
- name: Build runtime
run: |
cmake -B build -S runtime -DBUILD_TESTING=ON
cmake -B build -G Ninja -S runtime -DBUILD_TESTING=ON
cmake --build build --parallel

build-windows:
name: build (windows-latest)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
cache: true
install: >-
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-ninja

- name: Build runtime
run: |
cmake --version
gcc --version

cmake -S runtime -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF
cmake --build build --parallel
2 changes: 2 additions & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ endif()
include(openfst)
include_directories(${PROJECT_SOURCE_DIR})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")

add_subdirectory(utils)
add_subdirectory(processor)
add_subdirectory(bin)
Expand Down
4 changes: 2 additions & 2 deletions runtime/cmake/openfst.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ if(NOT ANDROID)
# To build openfst with gflags and glog, we comment out some vars of {flags, log}.h and flags.cc.
set(openfst_SOURCE_DIR ${fc_base}/openfst-src CACHE PATH "OpenFST source directory")
FetchContent_Declare(openfst
URL https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-04-11.tar.gz
URL_HASH SHA256=57fbc4b950ae81b1a0e1e298af15652da968a6723a592b7874e9b4027a80a5b4
URL https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-06-15.tar.gz
URL_HASH SHA256=5f9323ded5c9cf4d4e23325dd92652b18b553556ad92b59996e687ebd9688490
)
FetchContent_MakeAvailable(openfst)
include_directories(${openfst_SOURCE_DIR}/src/include)
Expand Down
11 changes: 2 additions & 9 deletions runtime/processor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ add_library(wetext_processor STATIC
wetext_processor.cc
wetext_token_parser.cc
)
if(ANDROID)
target_link_libraries(wetext_processor PUBLIC fst wetext_utils)
else()
if(MSVC)
target_link_libraries(wetext_processor PUBLIC fst wetext_utils)
else()
target_link_libraries(wetext_processor PUBLIC dl fst wetext_utils)
endif()
endif()

target_link_libraries(wetext_processor PUBLIC fst wetext_utils)

# ----------------------------------------------------------------------------
# C API shared library (wetext_processor_c)
Expand Down
Loading