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
vision
Commits
a0a92670
"vscode:/vscode.git/clone" did not exist on "8c2c08df56200ef6c42d93925efc494b009bf9b7"
Unverified
Commit
a0a92670
authored
Sep 29, 2020
by
Francisco Massa
Committed by
GitHub
Sep 29, 2020
Browse files
Add macos unittest (#2727)
* Add macos unittest * Add wget
parent
09deac52
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
2 deletions
+105
-2
.circleci/config.yml
.circleci/config.yml
+54
-0
.circleci/config.yml.in
.circleci/config.yml.in
+42
-0
.circleci/regenerate.py
.circleci/regenerate.py
+3
-1
.circleci/unittest/linux/scripts/setup_env.sh
.circleci/unittest/linux/scripts/setup_env.sh
+6
-1
No files found.
.circleci/config.yml
View file @
a0a92670
...
@@ -551,6 +551,48 @@ jobs:
...
@@ -551,6 +551,48 @@ jobs:
-
store_test_results
:
-
store_test_results
:
path
:
test-results
path
:
test-results
unittest_macos_cpu
:
<<
:
*binary_common
macos
:
xcode
:
"
9.4.1"
resource_class
:
large
steps
:
-
checkout
-
run
:
name
:
Install wget
command
:
HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
# Disable brew auto update which is very slow
-
run
:
name
:
Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command
:
echo "$(date +"%Y-%U")" > .circleci-weekly
-
restore_cache
:
keys
:
-
env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
-
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 ".circleci-weekly" }}
paths
:
-
conda
-
env
-
run
:
name
:
Install torchvision
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
cmake_linux_cpu
:
cmake_linux_cpu
:
<<
:
*binary_common
<<
:
*binary_common
docker
:
docker
:
...
@@ -1075,6 +1117,18 @@ workflows:
...
@@ -1075,6 +1117,18 @@ workflows:
cu_version
:
cu101
cu_version
:
cu101
name
:
unittest_windows_gpu_py3.8
name
:
unittest_windows_gpu_py3.8
python_version
:
'
3.8'
python_version
:
'
3.8'
-
unittest_macos_cpu
:
cu_version
:
cpu
name
:
unittest_macos_cpu_py3.6
python_version
:
'
3.6'
-
unittest_macos_cpu
:
cu_version
:
cpu
name
:
unittest_macos_cpu_py3.7
python_version
:
'
3.7'
-
unittest_macos_cpu
:
cu_version
:
cpu
name
:
unittest_macos_cpu_py3.8
python_version
:
'
3.8'
cmake
:
cmake
:
jobs
:
jobs
:
...
...
.circleci/config.yml.in
View file @
a0a92670
...
@@ -551,6 +551,48 @@ jobs:
...
@@ -551,6 +551,48 @@ jobs:
- store_test_results:
- store_test_results:
path: test-results
path: test-results
unittest_macos_cpu:
<<: *binary_common
macos:
xcode: "9.4.1"
resource_class: large
steps:
- checkout
- run:
name: Install wget
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
# Disable brew auto update which is very slow
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
{% raw %}
keys:
- env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% 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 ".circleci-weekly" }}
{% endraw %}
paths:
- conda
- env
- run:
name: Install torchvision
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
cmake_linux_cpu:
cmake_linux_cpu:
<<: *binary_common
<<: *binary_common
docker:
docker:
...
...
.circleci/regenerate.py
View file @
a0a92670
...
@@ -165,8 +165,10 @@ def indent(indentation, data_list):
...
@@ -165,8 +165,10 @@ def indent(indentation, data_list):
def
unittest_workflows
(
indentation
=
6
):
def
unittest_workflows
(
indentation
=
6
):
jobs
=
[]
jobs
=
[]
for
os_type
in
[
"linux"
,
"windows"
]:
for
os_type
in
[
"linux"
,
"windows"
,
"macos"
]:
for
device_type
in
[
"cpu"
,
"gpu"
]:
for
device_type
in
[
"cpu"
,
"gpu"
]:
if
os_type
==
"macos"
and
device_type
==
"gpu"
:
continue
for
i
,
python_version
in
enumerate
(
PYTHON_VERSIONS
):
for
i
,
python_version
in
enumerate
(
PYTHON_VERSIONS
):
job
=
{
job
=
{
"name"
:
f
"unittest_
{
os_type
}
_
{
device_type
}
_py
{
python_version
}
"
,
"name"
:
f
"unittest_
{
os_type
}
_
{
device_type
}
_py
{
python_version
}
"
,
...
...
.circleci/unittest/linux/scripts/setup_env.sh
View file @
a0a92670
...
@@ -14,10 +14,15 @@ env_dir="${root_dir}/env"
...
@@ -14,10 +14,15 @@ env_dir="${root_dir}/env"
cd
"
${
root_dir
}
"
cd
"
${
root_dir
}
"
case
"
$(
uname
-s
)
"
in
Darwin
*
)
os
=
MacOSX
;;
*
)
os
=
Linux
esac
# 1. Install conda at ./conda
# 1. Install conda at ./conda
if
[
!
-d
"
${
conda_dir
}
"
]
;
then
if
[
!
-d
"
${
conda_dir
}
"
]
;
then
printf
"* Installing conda
\n
"
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
}
"
bash ./miniconda.sh
-b
-f
-p
"
${
conda_dir
}
"
fi
fi
eval
"
$(
${
conda_dir
}
/bin/conda shell.bash hook
)
"
eval
"
$(
${
conda_dir
}
/bin/conda shell.bash hook
)
"
...
...
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