mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-10 02:22:16 +00:00
109 lines
3.3 KiB
YAML
109 lines
3.3 KiB
YAML
# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
|
|
|
|
# See ../../LICENSE for clarification regarding multiple authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# refer to https://github.com/actions/starter-workflows/pull/47/files
|
|
|
|
name: build_conda_ubuntu_cpu
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
KALDIFEAT_BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
generate_build_matrix:
|
|
# see https://github.com/pytorch/pytorch/pull/50633
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Generating build matrix
|
|
id: set-matrix
|
|
run: |
|
|
# outputting for debugging purposes
|
|
python scripts/github_actions/generate_build_matrix.py
|
|
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
|
|
echo "::set-output name=matrix::${MATRIX}"
|
|
|
|
build_conda_ubuntu_cpu:
|
|
needs: generate_build_matrix
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
${{ fromJson(needs.generate_build_matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
# refer to https://github.com/actions/checkout
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
auto-update-conda: true
|
|
python-version: ${{ matrix.python-version }}
|
|
activate-environment: kaldifeat
|
|
|
|
- name: Display Python version
|
|
shell: bash -l {0}
|
|
run: |
|
|
python3 -c "import sys; print(sys.version)"
|
|
which python3
|
|
|
|
- name: Install conda dependencies
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda install -y -q anaconda-client
|
|
conda install -y -q conda-build
|
|
conda install -y -q -c pytorch pytorch=${{ matrix.torch }} cpuonly
|
|
|
|
- name: Display conda info
|
|
shell: bash -l {0}
|
|
run: |
|
|
which conda
|
|
conda env list
|
|
conda info
|
|
nproc
|
|
|
|
- name: Build kaldifeat
|
|
shell: bash -l {0}
|
|
env:
|
|
KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
|
|
KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
|
|
KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
|
|
KALDIFEAT_IS_GITHUB_ACTIONS: 1
|
|
KALDIFEAT_IS_FOR_CONDA: 1
|
|
run: |
|
|
export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
|
|
./scripts/build_conda_cpu.sh
|
|
|
|
- name: Display generated files
|
|
run: |
|
|
ls -lh /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64
|
|
|
|
- name: Upload generated files
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: cpu-torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-18.04
|
|
path: /usr/share/miniconda/envs/kaldifeat/conda-bld/linux-64/*.tar.bz2
|