Committed by
GitHub
Fix publishing linux pre-built artifacts (#1919)
正在显示
4 个修改的文件
包含
62 行增加
和
48 行删除
| @@ -142,11 +142,66 @@ jobs: | @@ -142,11 +142,66 @@ jobs: | ||
| 142 | ls -lh build/bin/sherpa-onnx | 142 | ls -lh build/bin/sherpa-onnx |
| 143 | readelf -d build/bin/sherpa-onnx | 143 | readelf -d build/bin/sherpa-onnx |
| 144 | 144 | ||
| 145 | + rm -fv build/install/include/cargs.h | ||
| 146 | + rm -fv build/install/lib/cargs.h | ||
| 147 | + rm -fv build/install/lib/libcargs.so | ||
| 148 | + rm -rfv build/install/lib/pkgconfig | ||
| 149 | + | ||
| 145 | - uses: actions/upload-artifact@v4 | 150 | - uses: actions/upload-artifact@v4 |
| 146 | with: | 151 | with: |
| 147 | name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }} | 152 | name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }} |
| 148 | path: install/* | 153 | path: install/* |
| 149 | 154 | ||
| 155 | + - name: Copy files | ||
| 156 | + shell: bash | ||
| 157 | + if: matrix.build_type == 'Release' | ||
| 158 | + run: | | ||
| 159 | + du -h -d1 . | ||
| 160 | + SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 161 | + | ||
| 162 | + if [[ ${{ matrix.shared_lib }} == 'ON' ]]; then | ||
| 163 | + suffix=shared | ||
| 164 | + else | ||
| 165 | + suffix=static | ||
| 166 | + fi | ||
| 167 | + | ||
| 168 | + if [[ ${{ matrix.with_tts }} == ON ]]; then | ||
| 169 | + dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-x64-$suffix | ||
| 170 | + else | ||
| 171 | + dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-x64-$suffix-no-tts | ||
| 172 | + fi | ||
| 173 | + mkdir $dst | ||
| 174 | + | ||
| 175 | + cp -a build/install/bin $dst/ | ||
| 176 | + if [[ ${{ matrix.shared_lib }} == ON ]]; then | ||
| 177 | + cp -av build/install/lib $dst/ | ||
| 178 | + fi | ||
| 179 | + cp -a build/install/include $dst/ | ||
| 180 | + | ||
| 181 | + tree $dst | ||
| 182 | + | ||
| 183 | + tar cjvf ${dst}.tar.bz2 $dst | ||
| 184 | + du -h -d1 . | ||
| 185 | + | ||
| 186 | + - name: Release pre-compiled binaries and libs for linux x64 | ||
| 187 | + if: github.repository_owner == 'csukuangfj' && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release' | ||
| 188 | + uses: svenstaro/upload-release-action@v2 | ||
| 189 | + with: | ||
| 190 | + file_glob: true | ||
| 191 | + overwrite: true | ||
| 192 | + file: sherpa-onnx-*.tar.bz2 | ||
| 193 | + # repo_name: k2-fsa/sherpa-onnx | ||
| 194 | + # repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} | ||
| 195 | + # tag: v1.10.45 | ||
| 196 | + | ||
| 197 | + - name: Release pre-compiled binaries and libs for linux x64 | ||
| 198 | + if: github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release' | ||
| 199 | + uses: svenstaro/upload-release-action@v2 | ||
| 200 | + with: | ||
| 201 | + file_glob: true | ||
| 202 | + overwrite: true | ||
| 203 | + file: sherpa-onnx-*.tar.bz2 | ||
| 204 | + | ||
| 150 | - name: Test offline TTS | 205 | - name: Test offline TTS |
| 151 | if: matrix.with_tts == 'ON' | 206 | if: matrix.with_tts == 'ON' |
| 152 | shell: bash | 207 | shell: bash |
| @@ -324,8 +379,6 @@ jobs: | @@ -324,8 +379,6 @@ jobs: | ||
| 324 | .github/scripts/test-offline-whisper.sh | 379 | .github/scripts/test-offline-whisper.sh |
| 325 | du -h -d1 . | 380 | du -h -d1 . |
| 326 | 381 | ||
| 327 | - | ||
| 328 | - | ||
| 329 | - name: Test online paraformer | 382 | - name: Test online paraformer |
| 330 | shell: bash | 383 | shell: bash |
| 331 | run: | | 384 | run: | |
| @@ -335,42 +388,3 @@ jobs: | @@ -335,42 +388,3 @@ jobs: | ||
| 335 | 388 | ||
| 336 | .github/scripts/test-online-paraformer.sh | 389 | .github/scripts/test-online-paraformer.sh |
| 337 | du -h -d1 . | 390 | du -h -d1 . |
| 338 | - | ||
| 339 | - - name: Copy files | ||
| 340 | - shell: bash | ||
| 341 | - if: matrix.build_type == 'Release' | ||
| 342 | - run: | | ||
| 343 | - du -h -d1 . | ||
| 344 | - SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 345 | - | ||
| 346 | - if [[ ${{ matrix.shared_lib }} == 'ON' ]]; then | ||
| 347 | - suffix=shared | ||
| 348 | - else | ||
| 349 | - suffix=static | ||
| 350 | - fi | ||
| 351 | - | ||
| 352 | - if [[ ${{ matrix.with_tts }} ]]; then | ||
| 353 | - dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-x64-$suffix | ||
| 354 | - else | ||
| 355 | - dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-x64-$suffix-no-tts | ||
| 356 | - fi | ||
| 357 | - mkdir $dst | ||
| 358 | - | ||
| 359 | - cp -a build/install/bin $dst/ | ||
| 360 | - cp -a build/install/lib $dst/ | ||
| 361 | - cp -a build/install/include $dst/ | ||
| 362 | - | ||
| 363 | - tree $dst | ||
| 364 | - | ||
| 365 | - tar cjvf ${dst}.tar.bz2 $dst | ||
| 366 | - du -h -d1 . | ||
| 367 | - | ||
| 368 | - - name: Release pre-compiled binaries and libs for linux x64 | ||
| 369 | - if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release' | ||
| 370 | - uses: svenstaro/upload-release-action@v2 | ||
| 371 | - with: | ||
| 372 | - file_glob: true | ||
| 373 | - overwrite: true | ||
| 374 | - file: sherpa-onnx-*.tar.bz2 | ||
| 375 | - | ||
| 376 | - |
| @@ -137,8 +137,8 @@ jobs: | @@ -137,8 +137,8 @@ jobs: | ||
| 137 | export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH | 137 | export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH |
| 138 | export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH | 138 | export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH |
| 139 | export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH | 139 | export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH |
| 140 | - export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH | ||
| 141 | - export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH | 140 | + export PATH=/c/hostedtoolcache/windows/Python/3.12.9/x64/bin:$PATH |
| 141 | + export PATH=/c/hostedtoolcache/windows/Python/3.13.2/x64/bin:$PATH | ||
| 142 | 142 | ||
| 143 | which sherpa-onnx | 143 | which sherpa-onnx |
| 144 | sherpa-onnx --help | 144 | sherpa-onnx --help |
| @@ -110,8 +110,8 @@ jobs: | @@ -110,8 +110,8 @@ jobs: | ||
| 110 | export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH | 110 | export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH |
| 111 | export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH | 111 | export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH |
| 112 | export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH | 112 | export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH |
| 113 | - export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH | ||
| 114 | - export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH | 113 | + export PATH=/c/hostedtoolcache/windows/Python/3.12.9/x64/bin:$PATH |
| 114 | + export PATH=/c/hostedtoolcache/windows/Python/3.13.2/x64/bin:$PATH | ||
| 115 | 115 | ||
| 116 | sherpa-onnx --help | 116 | sherpa-onnx --help |
| 117 | sherpa-onnx-keyword-spotter --help | 117 | sherpa-onnx-keyword-spotter --help |
| @@ -158,9 +158,9 @@ jobs: | @@ -158,9 +158,9 @@ jobs: | ||
| 158 | file_glob: true | 158 | file_glob: true |
| 159 | overwrite: true | 159 | overwrite: true |
| 160 | file: sherpa-onnx-*-win-x64*.tar.bz2 | 160 | file: sherpa-onnx-*-win-x64*.tar.bz2 |
| 161 | - repo_name: k2-fsa/sherpa-onnx | ||
| 162 | - repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} | ||
| 163 | - tag: v1.10.45 | 161 | + # repo_name: k2-fsa/sherpa-onnx |
| 162 | + # repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} | ||
| 163 | + # tag: v1.10.45 | ||
| 164 | 164 | ||
| 165 | - name: Release pre-compiled binaries and libs for Windows x64 | 165 | - name: Release pre-compiled binaries and libs for Windows x64 |
| 166 | if: github.repository_owner == 'k2-fsa'&& github.event_name == 'push' && contains(github.ref, 'refs/tags/') | 166 | if: github.repository_owner == 'k2-fsa'&& github.event_name == 'push' && contains(github.ref, 'refs/tags/') |
-
请 注册 或 登录 后发表评论