Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -552,25 +552,9 @@ jobs:
- attach_workspace:
at: third_party
- designate_upload_channel
- generate_cache_key
- restore_cache:

keys:
- env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}

- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:

key: env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}

paths:
- conda
- env
- third_party/build
- third_party/install
- third_party/src
- run:
name: Install torchaudio
command: .circleci/unittest/linux/scripts/install.sh
Expand Down
16 changes: 0 additions & 16 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -552,25 +552,9 @@ jobs:
- attach_workspace:
at: third_party
- designate_upload_channel
- generate_cache_key
- restore_cache:
{% raw %}
keys:
- env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
{% endraw %}
paths:
- conda
- env
- third_party/build
- third_party/install
- third_party/src
- run:
name: Install torchaudio
command: .circleci/unittest/linux/scripts/install.sh
Expand Down
17 changes: 0 additions & 17 deletions .circleci/unittest/linux/scripts/environment.yml

This file was deleted.

19 changes: 17 additions & 2 deletions .circleci/unittest/linux/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,28 @@ eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env

if [ -z "${CUDA_VERSION:-}" ] ; then
cudatoolkit="cpuonly"
case "$(uname -s)" in
Darwin*) cudatoolkit="";;
*) cudatoolkit="cpuonly"
esac
else
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cudatoolkit="cudatoolkit=${version}"
fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch ${cudatoolkit}

printf "* Installing dependencies for test\n"
conda install -y -c conda-forge pytest pytest-cov codecov 'librosa>=0.8.0' scipy parameterized
pip install kaldi-io

printf "* Building codecs\n"
mkdir -p third_party/build
(
cd third_party/build
cmake ..
cmake --build .
)

printf "* Installing torchaudio\n"
BUILD_SOX=1 python setup.py install
2 changes: 2 additions & 0 deletions .circleci/unittest/linux/scripts/run_style_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -u
eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env

pip install clang-format flake8

# We want to run all the style checks even if one of them fail.

exit_status=0
Expand Down
17 changes: 0 additions & 17 deletions .circleci/unittest/linux/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

set -e

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand All @@ -32,19 +31,3 @@ if [ ! -d "${env_dir}" ]; then
printf "* Creating a test environment\n"
conda create --prefix "${env_dir}" -y python="$PYTHON_VERSION"
fi
conda activate "${env_dir}"

# 3. Install Conda dependencies
printf "* Installing dependencies (except PyTorch)\n"
conda env update --file "${this_dir}/environment.yml" --prune
if [ "${os}" == Linux ] ; then
pip install clang-format
fi

# 4. Buld codecs
mkdir -p third_party/build
(
cd third_party/build
cmake ..
cmake --build .
)