@@ -45,6 +45,67 @@ commands:
45
45
our_upload_channel=test
46
46
fi
47
47
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
48
+ install_cuda_compatible_cmath:
49
+ description: "Install CUDA compatible cmath"
50
+ steps:
51
+ - run:
52
+ name: _HACK_ Install CUDA compatible cmath
53
+ no_output_timeout: 1m
54
+ command: |
55
+ powershell .circleci/scripts/vs_install_cmath.ps1
56
+
57
+ brew_update:
58
+ description: "Update Homebrew and install base formulae"
59
+ steps:
60
+ - run:
61
+ name: Update Homebrew
62
+ no_output_timeout: "10m"
63
+ command: |
64
+ set -ex
65
+
66
+ # Update repositories manually.
67
+ # Running `brew update` produces a comparison between the
68
+ # current checkout and the updated checkout, which takes a
69
+ # very long time because the existing checkout is 2y old.
70
+ for path in $(find /usr/local/Homebrew -type d -name .git)
71
+ do
72
+ cd $path/..
73
+ git fetch --depth=1 origin
74
+ git reset --hard origin/master
75
+ done
76
+
77
+ export HOMEBREW_NO_AUTO_UPDATE=1
78
+
79
+ # Install expect and moreutils so that we can call `unbuffer` and `ts`.
80
+ # moreutils installs a `parallel` executable by default, which conflicts
81
+ # with the executable from the GNU `parallel`, so we must unlink GNU
82
+ # `parallel` first, and relink it afterwards.
83
+ brew install coreutils
84
+ brew unlink parallel
85
+ brew install moreutils
86
+ brew link parallel --overwrite
87
+ brew install expect
88
+
89
+ brew_install:
90
+ description: "Install Homebrew formulae"
91
+ parameters:
92
+ formulae:
93
+ type: string
94
+ default: ""
95
+ steps:
96
+ - run:
97
+ name: Install << parameters.formulae >>
98
+ no_output_timeout: "10m"
99
+ command: |
100
+ set -ex
101
+ export HOMEBREW_NO_AUTO_UPDATE=1
102
+ brew install << parameters.formulae >>
103
+
104
+ run_brew_for_ios_build:
105
+ steps:
106
+ - brew_update
107
+ - brew_install:
108
+ formulae: libtool
48
109
49
110
binary_common: &binary_common
50
111
parameters:
@@ -83,6 +144,22 @@ binary_common: &binary_common
83
144
UNICODE_ABI: << parameters.unicode_abi >>
84
145
CU_VERSION: << parameters.cu_version >>
85
146
147
+ torchvision_ios_params: &torchvision_ios_params
148
+ parameters:
149
+ build_environment:
150
+ type: string
151
+ default: ""
152
+ ios_arch:
153
+ type: string
154
+ default: ""
155
+ ios_platform:
156
+ type: string
157
+ default: ""
158
+ environment:
159
+ BUILD_ENVIRONMENT: << parameters.build_environment >>
160
+ IOS_ARCH: << parameters.ios_arch >>
161
+ IOS_PLATFORM: << parameters.ios_platform >>
162
+
86
163
smoke_test_common: &smoke_test_common
87
164
<<: *binary_common
88
165
docker:
@@ -212,6 +289,7 @@ jobs:
212
289
steps:
213
290
- checkout_merge
214
291
- designate_upload_channel
292
+ - install_cuda_compatible_cmath
215
293
- run:
216
294
name: Build conda packages
217
295
no_output_timeout: 20m
@@ -239,6 +317,7 @@ jobs:
239
317
steps:
240
318
- checkout_merge
241
319
- designate_upload_channel
320
+ - install_cuda_compatible_cmath
242
321
- run:
243
322
name: Build wheel packages
244
323
command: |
@@ -278,6 +357,43 @@ jobs:
278
357
paths:
279
358
- "*"
280
359
360
+ binary_ios_build:
361
+ <<: *torchvision_ios_params
362
+ macos:
363
+ xcode: "12.0"
364
+ steps:
365
+ - attach_workspace:
366
+ at: ~/workspace
367
+ - checkout
368
+ - run_brew_for_ios_build
369
+ - run:
370
+ name: Build
371
+ no_output_timeout: "1h"
372
+ command: |
373
+ script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_build.sh"
374
+ cat "$script"
375
+ source "$script"
376
+ - persist_to_workspace:
377
+ root: /Users/distiller/workspace/
378
+ paths: ios
379
+
380
+ binary_ios_upload:
381
+ <<: *torchvision_ios_params
382
+ macos:
383
+ xcode: "12.0"
384
+ steps:
385
+ - attach_workspace:
386
+ at: ~/workspace
387
+ - checkout
388
+ - run_brew_for_ios_build
389
+ - run:
390
+ name: Upload
391
+ no_output_timeout: "1h"
392
+ command: |
393
+ script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_upload.sh"
394
+ cat "$script"
395
+ source "$script"
396
+
281
397
binary_macos_conda:
282
398
<<: *binary_common
283
399
macos:
@@ -546,6 +662,7 @@ jobs:
546
662
steps:
547
663
- checkout
548
664
- designate_upload_channel
665
+ - install_cuda_compatible_cmath
549
666
- run:
550
667
name: Generate cache key
551
668
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -587,6 +704,7 @@ jobs:
587
704
steps:
588
705
- checkout
589
706
- designate_upload_channel
707
+ - install_cuda_compatible_cmath
590
708
- run:
591
709
name: Generate cache key
592
710
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -595,7 +713,7 @@ jobs:
595
713
{% raw %}
596
714
keys:
597
715
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
598
- {% endraw %}
716
+ {% endraw %}
599
717
- run:
600
718
name: Setup
601
719
command: .circleci/unittest/windows/scripts/setup_env.sh
@@ -716,6 +834,7 @@ jobs:
716
834
steps:
717
835
- checkout_merge
718
836
- designate_upload_channel
837
+ - install_cuda_compatible_cmath
719
838
- run:
720
839
command: |
721
840
set -ex
@@ -729,6 +848,7 @@ jobs:
729
848
steps:
730
849
- checkout_merge
731
850
- designate_upload_channel
851
+ - install_cuda_compatible_cmath
732
852
- run:
733
853
command: |
734
854
set -ex
@@ -813,6 +933,7 @@ workflows:
813
933
- clang_format
814
934
- torchhub_test
815
935
- torch_onnx_test
936
+ {{ ios_workflows() }}
816
937
817
938
unittest:
818
939
jobs:
@@ -832,6 +953,7 @@ workflows:
832
953
- clang_format
833
954
- torchhub_test
834
955
- torch_onnx_test
956
+ {{ ios_workflows(nightly=True) }}
835
957
{{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }}
836
958
docker_build:
837
959
triggers:
0 commit comments