mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 09:32:20 +00:00
87 lines
2.6 KiB
YAML
87 lines
2.6 KiB
YAML
name: multi-zh-hans
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: multi-zh-hans-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
generate_build_matrix:
|
|
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
|
|
# see https://github.com/pytorch/pytorch/pull/50633
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Generating build matrix
|
|
id: set-matrix
|
|
run: |
|
|
# outputting for debugging purposes
|
|
python ./.github/scripts/docker/generate_build_matrix.py --torch-version "2.7.0" --python-version "3.11"
|
|
MATRIX=$(python ./.github/scripts/docker/generate_build_matrix.py --torch-version "2.7.0" --python-version "3.11")
|
|
echo "::set-output name=matrix::${MATRIX}"
|
|
multi-zh-hans:
|
|
needs: generate_build_matrix
|
|
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }} v${{ matrix.version }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Free space
|
|
shell: bash
|
|
run: |
|
|
df -h
|
|
rm -rf /opt/hostedtoolcache
|
|
df -h
|
|
echo "pwd: $PWD"
|
|
echo "github.workspace ${{ github.workspace }}"
|
|
|
|
- name: Test with multi_zh-hans
|
|
uses: addnab/docker-run-action@v3
|
|
with:
|
|
image: ghcr.io/${{ github.repository_owner }}/icefall:cpu-py${{ matrix.python-version }}-torch${{ matrix.torch-version }}-v${{ matrix.version }}
|
|
options: |
|
|
--volume ${{ github.workspace }}/:/icefall
|
|
shell: bash
|
|
run: |
|
|
export PYTHONPATH=/icefall:$PYTHONPATH
|
|
export HF_TOKEN=${{ secrets.HF_TOKEN }}
|
|
cd /icefall
|
|
git config --global --add safe.directory /icefall
|
|
|
|
.github/scripts/multi_zh-hans/ASR/run.sh
|
|
|
|
- name: Show models
|
|
shell: bash
|
|
run: |
|
|
ls -lh *.tar.bz2
|
|
|
|
- name: upload model to https://github.com/k2-fsa/sherpa-onnx
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
file_glob: true
|
|
file: ./*.tar.bz2
|
|
overwrite: true
|
|
repo_name: k2-fsa/sherpa-onnx
|
|
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
|
|
tag: asr-models
|