Committed by
GitHub
Use onnxruntime static lib compiled with gcc8 on ubuntu 20.04 (#587)
正在显示
3 个修改的文件
包含
44 行增加
和
18 行删除
| @@ -45,24 +45,50 @@ concurrency: | @@ -45,24 +45,50 @@ concurrency: | ||
| 45 | 45 | ||
| 46 | jobs: | 46 | jobs: |
| 47 | linux: | 47 | linux: |
| 48 | - name: ${{ matrix.build_type }} ${{ matrix.shared_lib }} | 48 | + name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.shared_lib }} ${{ matrix.gcc_version }} |
| 49 | runs-on: ${{ matrix.os }} | 49 | runs-on: ${{ matrix.os }} |
| 50 | strategy: | 50 | strategy: |
| 51 | fail-fast: false | 51 | fail-fast: false |
| 52 | matrix: | 52 | matrix: |
| 53 | - os: [ubuntu-latest] | 53 | + os: [ubuntu-20.04, ubuntu-22.04] |
| 54 | build_type: [Release, Debug] | 54 | build_type: [Release, Debug] |
| 55 | shared_lib: [ON, OFF] | 55 | shared_lib: [ON, OFF] |
| 56 | + # see https://github.com/egor-tensin/setup-gcc | ||
| 57 | + # 7-11 for ubuntu 20.04 | ||
| 58 | + # 9-12 for ubuntu 22.04 | ||
| 59 | + gcc_version: ["7", "8", "9", "10", "11", "12", "13"] | ||
| 60 | + exclude: | ||
| 61 | + - os: ubuntu-20.04 | ||
| 62 | + gcc_version: "12" | ||
| 63 | + - os: ubuntu-22.04 | ||
| 64 | + gcc_version: "7" | ||
| 65 | + - os: ubuntu-22.04 | ||
| 66 | + gcc_version: "8" | ||
| 56 | 67 | ||
| 57 | steps: | 68 | steps: |
| 58 | - uses: actions/checkout@v4 | 69 | - uses: actions/checkout@v4 |
| 59 | with: | 70 | with: |
| 60 | fetch-depth: 0 | 71 | fetch-depth: 0 |
| 61 | 72 | ||
| 73 | + - name: Set up GCC ${{ matrix.gcc_version }} | ||
| 74 | + uses: egor-tensin/setup-gcc@v1 | ||
| 75 | + with: | ||
| 76 | + version: ${{ matrix.gcc_version }} | ||
| 77 | + platform: x64 | ||
| 78 | + | ||
| 79 | + - name: Display gcc version ${{ matrix.gcc_version }} | ||
| 80 | + shell: bash | ||
| 81 | + run: | | ||
| 82 | + which gcc | ||
| 83 | + gcc --version | ||
| 84 | + | ||
| 85 | + which g++ | ||
| 86 | + g++ --version | ||
| 87 | + | ||
| 62 | - name: ccache | 88 | - name: ccache |
| 63 | uses: hendrikmuhs/ccache-action@v1.2 | 89 | uses: hendrikmuhs/ccache-action@v1.2 |
| 64 | with: | 90 | with: |
| 65 | - key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }} | 91 | + key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }}-gcc-${{ matrix.gcc_version }} |
| 66 | 92 | ||
| 67 | - name: Configure CMake | 93 | - name: Configure CMake |
| 68 | shell: bash | 94 | shell: bash |
| @@ -14,19 +14,19 @@ if(BUILD_SHARED_LIBS) | @@ -14,19 +14,19 @@ if(BUILD_SHARED_LIBS) | ||
| 14 | message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}") | 14 | message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}") |
| 15 | endif() | 15 | endif() |
| 16 | 16 | ||
| 17 | -set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.0/onnxruntime-linux-x64-static_lib-1.17.0.zip") | ||
| 18 | -set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-x64-static_lib-1.17.0.zip") | ||
| 19 | -set(onnxruntime_HASH "SHA256=137a5e5a9195c74452f3b772533545441ef0933a154fa006f2a13da8f956907d") | 17 | +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") |
| 18 | +set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip") | ||
| 19 | +set(onnxruntime_HASH "SHA256=4217302eac0d645b4c2b5fa13d1627c0384d2531615b4a51a52326c01568cc0c") | ||
| 20 | 20 | ||
| 21 | # If you don't have access to the Internet, | 21 | # If you don't have access to the Internet, |
| 22 | # please download onnxruntime to one of the following locations. | 22 | # please download onnxruntime to one of the following locations. |
| 23 | # You can add more if you want. | 23 | # You can add more if you want. |
| 24 | set(possible_file_locations | 24 | set(possible_file_locations |
| 25 | - $ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.17.0.zip | ||
| 26 | - ${CMAKE_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.17.0.zip | ||
| 27 | - ${CMAKE_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.17.0.zip | ||
| 28 | - /tmp/onnxruntime-linux-x64-static_lib-1.17.0.zip | ||
| 29 | - /star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.17.0.zip | 25 | + $ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip |
| 26 | + ${CMAKE_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip | ||
| 27 | + ${CMAKE_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip | ||
| 28 | + /tmp/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip | ||
| 29 | + /star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.17.0-gcc-8.zip | ||
| 30 | ) | 30 | ) |
| 31 | 31 | ||
| 32 | foreach(f IN LISTS possible_file_locations) | 32 | foreach(f IN LISTS possible_file_locations) |
| 1 | function(download_piper_phonemize) | 1 | function(download_piper_phonemize) |
| 2 | include(FetchContent) | 2 | include(FetchContent) |
| 3 | 3 | ||
| 4 | - set(piper_phonemize_URL "https://github.com/csukuangfj/piper-phonemize/archive/6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip") | 4 | + set(piper_phonemize_URL "https://github.com/csukuangfj/piper-phonemize/archive/dc6b5f4441bffe521047086930b0fc12686acd56.zip") |
| 5 | set(piper_phonemize_URL2 "") | 5 | set(piper_phonemize_URL2 "") |
| 6 | - set(piper_phonemize_HASH "SHA256=6fbacf540b03f00d1386bb372fb7090e3bb852bd019d74e615d3f161f728bc93") | 6 | + set(piper_phonemize_HASH "SHA256=b9faa04204b1756fa455a962abb1f037041c040133d55be58d11f11ab9b3ce14") |
| 7 | 7 | ||
| 8 | # If you don't have access to the Internet, | 8 | # If you don't have access to the Internet, |
| 9 | # please pre-download kaldi-decoder | 9 | # please pre-download kaldi-decoder |
| 10 | set(possible_file_locations | 10 | set(possible_file_locations |
| 11 | - $ENV{HOME}/Downloads/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip | ||
| 12 | - ${CMAKE_SOURCE_DIR}/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip | ||
| 13 | - ${CMAKE_BINARY_DIR}/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip | ||
| 14 | - /tmp/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip | ||
| 15 | - /star-fj/fangjun/download/github/piper-phonemize-6383e46b62e94c5cafc0c6a6212249ed8b9ed8d0.zip | 11 | + $ENV{HOME}/Downloads/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip |
| 12 | + ${CMAKE_SOURCE_DIR}/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip | ||
| 13 | + ${CMAKE_BINARY_DIR}/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip | ||
| 14 | + /tmp/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip | ||
| 15 | + /star-fj/fangjun/download/github/piper-phonemize-dc6b5f4441bffe521047086930b0fc12686acd56.zip | ||
| 16 | ) | 16 | ) |
| 17 | 17 | ||
| 18 | foreach(f IN LISTS possible_file_locations) | 18 | foreach(f IN LISTS possible_file_locations) |
-
请 注册 或 登录 后发表评论