Use onnxruntime static lib compiled with gcc8 on ubuntu 20.04 (#587)
This commit is contained in:
32
.github/workflows/linux.yaml
vendored
32
.github/workflows/linux.yaml
vendored
@@ -45,24 +45,50 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
name: ${{ matrix.build_type }} ${{ matrix.shared_lib }}
|
name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.shared_lib }} ${{ matrix.gcc_version }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-20.04, ubuntu-22.04]
|
||||||
build_type: [Release, Debug]
|
build_type: [Release, Debug]
|
||||||
shared_lib: [ON, OFF]
|
shared_lib: [ON, OFF]
|
||||||
|
# see https://github.com/egor-tensin/setup-gcc
|
||||||
|
# 7-11 for ubuntu 20.04
|
||||||
|
# 9-12 for ubuntu 22.04
|
||||||
|
gcc_version: ["7", "8", "9", "10", "11", "12", "13"]
|
||||||
|
exclude:
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
gcc_version: "12"
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
gcc_version: "7"
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
gcc_version: "8"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up GCC ${{ matrix.gcc_version }}
|
||||||
|
uses: egor-tensin/setup-gcc@v1
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.gcc_version }}
|
||||||
|
platform: x64
|
||||||
|
|
||||||
|
- name: Display gcc version ${{ matrix.gcc_version }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
which gcc
|
||||||
|
gcc --version
|
||||||
|
|
||||||
|
which g++
|
||||||
|
g++ --version
|
||||||
|
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }}
|
key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }}-gcc-${{ matrix.gcc_version }}
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -14,19 +14,19 @@ if(BUILD_SHARED_LIBS)
|
|||||||
message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
|
message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.0/onnxruntime-linux-x64-static_lib-1.17.0.zip")
|
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.0/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip")
|
||||||
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-x64-static_lib-1.17.0.zip")
|
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip")
|
||||||
set(onnxruntime_HASH "SHA256=137a5e5a9195c74452f3b772533545441ef0933a154fa006f2a13da8f956907d")
|
set(onnxruntime_HASH "SHA256=4217302eac0d645b4c2b5fa13d1627c0384d2531615b4a51a52326c01568cc0c")
|
||||||
|
|
||||||
# If you don't have access to the Internet,
|
# If you don't have access to the Internet,
|
||||||
# please download onnxruntime to one of the following locations.
|
# please download onnxruntime to one of the following locations.
|
||||||
# You can add more if you want.
|
# You can add more if you want.
|
||||||
set(possible_file_locations
|
set(possible_file_locations
|
||||||
$ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.17.0.zip
|
$ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip
|
||||||
${CMAKE_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.17.0.zip
|
${CMAKE_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip
|
||||||
${CMAKE_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.17.0.zip
|
${CMAKE_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip
|
||||||
/tmp/onnxruntime-linux-x64-static_lib-1.17.0.zip
|
/tmp/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip
|
||||||
/star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.17.0.zip
|
/star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(f IN LISTS possible_file_locations)
|
foreach(f IN LISTS possible_file_locations)
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
function(download_piper_phonemize)
|
function(download_piper_phonemize)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
set(piper_phonemize_URL "https://github.com/csukuangfj/piper-phonemize/archive/6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip")
|
set(piper_phonemize_URL "https://github.com/csukuangfj/piper-phonemize/archive/dc6b5f4441bffe521047086930b0fc12686acd56.zip")
|
||||||
set(piper_phonemize_URL2 "")
|
set(piper_phonemize_URL2 "")
|
||||||
set(piper_phonemize_HASH "SHA256=6fbacf540b03f00d1386bb372fb7090e3bb852bd019d74e615d3f161f728bc93")
|
set(piper_phonemize_HASH "SHA256=b9faa04204b1756fa455a962abb1f037041c040133d55be58d11f11ab9b3ce14")
|
||||||
|
|
||||||
# If you don't have access to the Internet,
|
# If you don't have access to the Internet,
|
||||||
# please pre-download kaldi-decoder
|
# please pre-download kaldi-decoder
|
||||||
set(possible_file_locations
|
set(possible_file_locations
|
||||||
$ENV{HOME}/Downloads/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip
|
$ENV{HOME}/Downloads/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip
|
||||||
${CMAKE_SOURCE_DIR}/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip
|
${CMAKE_SOURCE_DIR}/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip
|
||||||
${CMAKE_BINARY_DIR}/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip
|
${CMAKE_BINARY_DIR}/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip
|
||||||
/tmp/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip
|
/tmp/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip
|
||||||
/star-fj/fangjun/download/github/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip
|
/star-fj/fangjun/download/github/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(f IN LISTS possible_file_locations)
|
foreach(f IN LISTS possible_file_locations)
|
||||||
|
|||||||
Reference in New Issue
Block a user