Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
f6dc2f67
Unverified
Commit
f6dc2f67
authored
Jul 14, 2020
by
moto
Committed by
GitHub
Jul 14, 2020
Browse files
Add macOS CPU unittest (#777)
parent
c9142fd5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
5 deletions
+112
-5
.circleci/config.yml
.circleci/config.yml
+57
-1
.circleci/config.yml.in
.circleci/config.yml.in
+42
-1
.circleci/regenerate.py
.circleci/regenerate.py
+4
-1
.circleci/unittest/linux/scripts/environment.yml
.circleci/unittest/linux/scripts/environment.yml
+0
-1
.circleci/unittest/linux/scripts/setup_env.sh
.circleci/unittest/linux/scripts/setup_env.sh
+9
-1
No files found.
.circleci/config.yml
View file @
f6dc2f67
...
...
@@ -43,7 +43,7 @@ commands:
steps
:
-
run
:
name
:
Install cmake and pkg-config
command
:
HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake pkg-config
command
:
HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake pkg-config
wget
# Disable brew auto update which is very slow
binary_common
:
&binary_common
...
...
@@ -533,6 +533,47 @@ jobs:
-
store_test_results
:
path
:
test-results
unittest_macos_cpu
:
<<
:
*binary_common
macos
:
xcode
:
"
9.0"
resource_class
:
large
steps
:
-
checkout
-
install_build_tools_macos
-
attach_workspace
:
at
:
third_party
-
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
-
run
:
name
:
Run tests
command
:
.circleci/unittest/linux/scripts/run_test.sh
-
run
:
name
:
Post process
command
:
.circleci/unittest/linux/scripts/post_process.sh
-
store_test_results
:
path
:
test-results
stylecheck
:
<<
:
*binary_common
docker
:
...
...
@@ -744,6 +785,21 @@ workflows:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_windows_gpu_py3.8
python_version
:
'
3.8'
-
unittest_macos_cpu
:
name
:
unittest_macos_cpu_py3.6
python_version
:
'
3.6'
requires
:
-
download_third_parties_nix
-
unittest_macos_cpu
:
name
:
unittest_macos_cpu_py3.7
python_version
:
'
3.7'
requires
:
-
download_third_parties_nix
-
unittest_macos_cpu
:
name
:
unittest_macos_cpu_py3.8
python_version
:
'
3.8'
requires
:
-
download_third_parties_nix
nightly
:
jobs
:
-
circleci_consistency
:
...
...
.circleci/config.yml.in
View file @
f6dc2f67
...
...
@@ -43,7 +43,7 @@ commands:
steps:
- run:
name: Install cmake and pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake pkg-config
wget
# Disable brew auto update which is very slow
binary_common: &binary_common
...
...
@@ -533,6 +533,47 @@ jobs:
- store_test_results:
path: test-results
unittest_macos_cpu:
<<: *binary_common
macos:
xcode: "9.0"
resource_class: large
steps:
- checkout
- install_build_tools_macos
- attach_workspace:
at: third_party
- 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
- run:
name: Run tests
command: .circleci/unittest/linux/scripts/run_test.sh
- run:
name: Post process
command: .circleci/unittest/linux/scripts/post_process.sh
- store_test_results:
path: test-results
stylecheck:
<<: *binary_common
docker:
...
...
.circleci/regenerate.py
View file @
f6dc2f67
...
...
@@ -136,8 +136,11 @@ def indent(indentation, data_list):
def
unittest_workflows
(
indentation
=
6
):
jobs
=
[]
jobs
+=
build_download_job
(
None
)
for
os_type
in
[
"linux"
,
"windows"
]:
for
os_type
in
[
"linux"
,
"windows"
,
"macos"
]:
for
device_type
in
[
"cpu"
,
"gpu"
]:
if
os_type
==
"macos"
and
device_type
==
"gpu"
:
continue
for
i
,
python_version
in
enumerate
(
PYTHON_VERSIONS
):
job
=
{
"name"
:
f
"unittest_
{
os_type
}
_
{
device_type
}
_py
{
python_version
}
"
,
...
...
.circleci/unittest/linux/scripts/environment.yml
View file @
f6dc2f67
...
...
@@ -11,7 +11,6 @@ dependencies:
-
llvmlite==0.31
# See https://github.com/pytorch/audio/pull/766
-
pip
-
pip
:
-
clang-format
-
kaldi-io
-
scipy
-
parameterized
...
...
.circleci/unittest/linux/scripts/setup_env.sh
View file @
f6dc2f67
...
...
@@ -14,10 +14,15 @@ env_dir="${root_dir}/env"
cd
"
${
root_dir
}
"
case
"
$(
uname
-s
)
"
in
Darwin
*
)
os
=
MacOSX
;;
*
)
os
=
Linux
esac
# 1. Install conda at ./conda
if
[
!
-d
"
${
conda_dir
}
"
]
;
then
printf
"* Installing conda
\n
"
wget
-O
miniconda.sh http://repo.continuum.io/miniconda/Miniconda3-latest-
Linux
-x86_64.sh
wget
-O
miniconda.sh
"
http://repo.continuum.io/miniconda/Miniconda3-latest-
${
os
}
-x86_64.sh
"
bash ./miniconda.sh
-b
-f
-p
"
${
conda_dir
}
"
fi
eval
"
$(
${
conda_dir
}
/bin/conda shell.bash hook
)
"
...
...
@@ -32,6 +37,9 @@ 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment