From af6e61a5a343cc9a1477429c1f0dd2bd6922132b Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Wed, 26 Jul 2023 12:38:22 +0800 Subject: [PATCH] Release v1.25 (#76) --- .github/workflows/macos-cpu-wheels.yml | 16 ---------------- .github/workflows/ubuntu-cpu-wheels.yml | 16 ---------------- .github/workflows/ubuntu-cuda-wheels.yml | 16 ---------------- .github/workflows/windows-x64-cpu-wheels.yml | 16 ---------------- CMakeLists.txt | 15 ++++++++------- kaldifeat/csrc/CMakeLists.txt | 7 ++++++- 6 files changed, 14 insertions(+), 72 deletions(-) diff --git a/.github/workflows/macos-cpu-wheels.yml b/.github/workflows/macos-cpu-wheels.yml index 3276f10..bbb8ec6 100644 --- a/.github/workflows/macos-cpu-wheels.yml +++ b/.github/workflows/macos-cpu-wheels.yml @@ -42,15 +42,6 @@ jobs: with: fetch-depth: 0 - - name: display - shell: bash - run: | - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - - retry ls -lh - # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ # for a list of versions - name: Build wheels @@ -64,15 +55,8 @@ jobs: - name: Display wheels shell: bash run: | - - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - name: Upload Wheel uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/ubuntu-cpu-wheels.yml b/.github/workflows/ubuntu-cpu-wheels.yml index e2b499e..6f9507a 100644 --- a/.github/workflows/ubuntu-cpu-wheels.yml +++ b/.github/workflows/ubuntu-cpu-wheels.yml @@ -42,15 +42,6 @@ jobs: with: fetch-depth: 0 - - name: display - shell: bash - run: | - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - - retry ls -lh - # see https://github.com/pytorch/test-infra/blob/9e3d392690719fac85bad0c9b67f530e48375ca1/tools/scripts/generate_binary_build_matrix.py # https://github.com/pytorch/builder/tree/main/manywheel # https://github.com/pytorch/builder/pull/476 @@ -74,15 +65,8 @@ jobs: - name: Display wheels shell: bash run: | - - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - name: Upload Wheel uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/ubuntu-cuda-wheels.yml b/.github/workflows/ubuntu-cuda-wheels.yml index 2dae310..bcfc307 100644 --- a/.github/workflows/ubuntu-cuda-wheels.yml +++ b/.github/workflows/ubuntu-cuda-wheels.yml @@ -42,15 +42,6 @@ jobs: with: fetch-depth: 0 - - name: display - shell: bash - run: | - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - - retry ls -lh - # see https://github.com/pytorch/test-infra/blob/9e3d392690719fac85bad0c9b67f530e48375ca1/tools/scripts/generate_binary_build_matrix.py # https://github.com/pytorch/builder/tree/main/manywheel # https://github.com/pytorch/builder/pull/476 @@ -85,15 +76,8 @@ jobs: - name: Display wheels shell: bash run: | - - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - name: Upload Wheel uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/windows-x64-cpu-wheels.yml b/.github/workflows/windows-x64-cpu-wheels.yml index 6748c7b..17f1793 100644 --- a/.github/workflows/windows-x64-cpu-wheels.yml +++ b/.github/workflows/windows-x64-cpu-wheels.yml @@ -42,15 +42,6 @@ jobs: with: fetch-depth: 0 - - name: display - shell: bash - run: | - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - - retry ls -lh - # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ # for a list of versions - name: Build wheels @@ -64,15 +55,8 @@ jobs: - name: Display wheels shell: bash run: | - - function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) - } - ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - name: Upload Wheel uses: actions/upload-artifact@v2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 84db893..daa5723 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(kaldifeat) # remember to change the version in # scripts/conda/kaldifeat/meta.yaml # scripts/conda-cpu/kaldifeat/meta.yaml -set(kaldifeat_VERSION "1.24") +set(kaldifeat_VERSION "1.25.0") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") @@ -26,11 +26,6 @@ endif() set(CMAKE_INSTALL_RPATH ${kaldifeat_rpath_origin}) set(CMAKE_BUILD_RPATH ${kaldifeat_rpath_origin}) -set(BUILD_SHARED_LIBS ON) -if(WIN32) - message(STATUS "Set BUILD_SHARED_LIBS to OFF for Windows") - set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) -endif() if(NOT CMAKE_BUILD_TYPE) message(STATUS "No CMAKE_BUILD_TYPE given, default to Release") @@ -45,10 +40,16 @@ message(STATUS "C++ Standard version: ${CMAKE_CXX_STANDARD}") list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) - +option(BUILD_SHARED_LIBS "Whether to build shared libraries" ON) option(kaldifeat_BUILD_TESTS "Whether to build tests or not" ON) option(kaldifeat_BUILD_PYMODULE "Whether to build python module or not" ON) +message(STATUS "BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}") + +if(BUILD_SHARED_LIBS AND MSVC) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + if(kaldifeat_BUILD_PYMODULE) include(pybind11) endif() diff --git a/kaldifeat/csrc/CMakeLists.txt b/kaldifeat/csrc/CMakeLists.txt index 2e140a6..be3cc0f 100644 --- a/kaldifeat/csrc/CMakeLists.txt +++ b/kaldifeat/csrc/CMakeLists.txt @@ -78,10 +78,15 @@ file(COPY DESTINATION ${PROJECT_BINARY_DIR}/include/kaldifeat/csrc ) - +if(BUILD_SHARED_LIBS AND WIN32) + install(TARGETS kaldifeat_core + DESTINATION ../ + ) +endif() install(TARGETS kaldifeat_core DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + install(FILES ${all_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/kaldifeat/csrc )