File tree Expand file tree Collapse file tree 2 files changed +61
-1
lines changed Expand file tree Collapse file tree 2 files changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,49 @@ jobs:
394394 - store_test_results :
395395 path : test-results
396396
397+ unittest_macos_cpu :
398+ << : *binary_common
399+ macos :
400+ xcode : " 9.4.1"
401+ resource_class : large
402+ steps :
403+ - checkout
404+ - designate_upload_channel
405+ - run :
406+ name : Install wget
407+ command : HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
408+ # Disable brew auto update which is very slow
409+ - run :
410+ name : Generate cache key
411+ # This will refresh cache on Sundays, nightly build should generate new cache.
412+ command : echo "$(date +"%Y-%U")" > .circleci-weekly
413+ - restore_cache :
414+
415+ keys :
416+ - env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
417+
418+ - run :
419+ name : Setup
420+ command : .circleci/unittest/linux/scripts/setup_env.sh
421+ - save_cache :
422+
423+ key : env-v3-macos-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
424+
425+ paths :
426+ - conda
427+ - env
428+ - run :
429+ name : Install torchcsprng
430+ command : .circleci/unittest/linux/scripts/install.sh
431+ - run :
432+ name : Run tests
433+ command : .circleci/unittest/linux/scripts/run_test.sh
434+ - run :
435+ name : Post process
436+ command : .circleci/unittest/linux/scripts/post_process.sh
437+ - store_test_results :
438+ path : test-results
439+
397440workflows :
398441 build :
399442 jobs :
@@ -848,6 +891,18 @@ workflows:
848891 cu_version : cu101
849892 name : unittest_windows_gpu_py3.8
850893 python_version : ' 3.8'
894+ - unittest_macos_cpu :
895+ cu_version : cpu
896+ name : unittest_macos_cpu_py3.6
897+ python_version : ' 3.6'
898+ - unittest_macos_cpu :
899+ cu_version : cpu
900+ name : unittest_macos_cpu_py3.7
901+ python_version : ' 3.7'
902+ - unittest_macos_cpu :
903+ cu_version : cpu
904+ name : unittest_macos_cpu_py3.8
905+ python_version : ' 3.8'
851906 nightly :
852907 jobs :
853908# - circleci_consistency
Original file line number Diff line number Diff line change @@ -14,10 +14,15 @@ env_dir="${root_dir}/env"
1414
1515cd " ${root_dir} "
1616
17+ case " $( uname -s) " in
18+ Darwin* ) os=MacOSX;;
19+ * ) os=Linux
20+ esac
21+
1722# 1. Install conda at ./conda
1823if [ ! -d " ${conda_dir} " ]; then
1924 printf " * Installing conda\n"
20- wget -O miniconda.sh http://repo.continuum.io/miniconda/Miniconda3-latest-Linux -x86_64.sh
25+ wget -O miniconda.sh " http://repo.continuum.io/miniconda/Miniconda3-latest-${os} -x86_64.sh"
2126 bash ./miniconda.sh -b -f -p " ${conda_dir} "
2227fi
2328eval " $( ${conda_dir} /bin/conda shell.bash hook) "
You can’t perform that action at this time.
0 commit comments