Skip to content

Commit 1624c07

Browse files
committed
👷 Ci build for windows
1 parent c094e41 commit 1624c07

4 files changed

Lines changed: 36 additions & 12 deletions

File tree

‎.github/workflows/runtime.yml‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,34 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- name: Build runtime
2020
run: |
21-
cmake -B build -S runtime -DBUILD_TESTING=ON
21+
cmake -B build -G Ninja -S runtime -DBUILD_TESTING=ON
22+
cmake --build build --parallel
23+
24+
build-windows:
25+
name: build (windows-latest)
26+
runs-on: windows-latest
27+
defaults:
28+
run:
29+
shell: msys2 {0}
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: msys2/setup-msys2@v2
34+
with:
35+
msystem: MINGW64
36+
# update: false
37+
# cache: true
38+
# install: >-
39+
# mingw-w64-x86_64-gcc
40+
# mingw-w64-x86_64-cmake
41+
# mingw-w64-x86_64-ninja
42+
43+
- name: Build runtime
44+
run: |
45+
cmake --version
46+
gcc --version
47+
48+
cmake -S runtime -B build -G Ninja \
49+
-DCMAKE_BUILD_TYPE=Release \
50+
-DBUILD_TESTING=OFF
2251
cmake --build build --parallel

‎runtime/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ endif()
2828
include(openfst)
2929
include_directories(${PROJECT_SOURCE_DIR})
3030

31+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
32+
3133
add_subdirectory(utils)
3234
add_subdirectory(processor)
3335
add_subdirectory(bin)

‎runtime/cmake/openfst.cmake‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ if(NOT ANDROID)
2727
# To build openfst with gflags and glog, we comment out some vars of {flags, log}.h and flags.cc.
2828
set(openfst_SOURCE_DIR ${fc_base}/openfst-src CACHE PATH "OpenFST source directory")
2929
FetchContent_Declare(openfst
30-
URL https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-04-11.tar.gz
31-
URL_HASH SHA256=57fbc4b950ae81b1a0e1e298af15652da968a6723a592b7874e9b4027a80a5b4
30+
URL https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-06-15.tar.gz
31+
URL_HASH SHA256=5f9323ded5c9cf4d4e23325dd92652b18b553556ad92b59996e687ebd9688490
3232
)
3333
FetchContent_MakeAvailable(openfst)
3434
include_directories(${openfst_SOURCE_DIR}/src/include)

‎runtime/processor/CMakeLists.txt‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@ add_library(wetext_processor STATIC
22
wetext_processor.cc
33
wetext_token_parser.cc
44
)
5-
if(ANDROID)
6-
target_link_libraries(wetext_processor PUBLIC fst wetext_utils)
7-
else()
8-
if(MSVC)
9-
target_link_libraries(wetext_processor PUBLIC fst wetext_utils)
10-
else()
11-
target_link_libraries(wetext_processor PUBLIC dl fst wetext_utils)
12-
endif()
13-
endif()
5+
6+
target_link_libraries(wetext_processor PUBLIC fst wetext_utils)
147

158
# ----------------------------------------------------------------------------
169
# C API shared library (wetext_processor_c)

0 commit comments

Comments
 (0)