Skip to content

Commit

Permalink
[fbsync] .circleci: Fix windows cmath issues (#3609)
Browse files Browse the repository at this point in the history
Summary: Signed-off-by: Eli Uriegas <eliuriegas@fb.com>

Reviewed By: fmassa

Differential Revision: D27433932

fbshipit-source-id: aa924160020b23b1041c5fc85f3c7410d191cce2
  • Loading branch information
parmeet authored and facebook-github-bot committed Apr 1, 2021
1 parent 00f8b7c commit 5aa76e4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ commands:
our_upload_channel=test
fi
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
install_cuda_compatible_cmath:
description: "Install CUDA compatible cmath"
steps:
- run:
name: _HACK_ Install CUDA compatible cmath
no_output_timeout: 1m
command: |
powershell .circleci/scripts/vs_install_cmath.ps1
binary_common: &binary_common
parameters:
Expand Down Expand Up @@ -212,6 +220,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Build conda packages
no_output_timeout: 20m
Expand Down Expand Up @@ -239,6 +248,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Build wheel packages
command: |
Expand Down Expand Up @@ -546,6 +556,7 @@ jobs:
steps:
- checkout
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -587,6 +598,7 @@ jobs:
steps:
- checkout
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -716,6 +728,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
command: |
set -ex
Expand All @@ -729,6 +742,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
command: |
set -ex
Expand Down
14 changes: 14 additions & 0 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ commands:
our_upload_channel=test
fi
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
install_cuda_compatible_cmath:
description: "Install CUDA compatible cmath"
steps:
- run:
name: _HACK_ Install CUDA compatible cmath
no_output_timeout: 1m
command: |
powershell .circleci/scripts/vs_install_cmath.ps1

binary_common: &binary_common
parameters:
Expand Down Expand Up @@ -212,6 +220,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Build conda packages
no_output_timeout: 20m
Expand Down Expand Up @@ -239,6 +248,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Build wheel packages
command: |
Expand Down Expand Up @@ -546,6 +556,7 @@ jobs:
steps:
- checkout
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -587,6 +598,7 @@ jobs:
steps:
- checkout
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -716,6 +728,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
command: |
set -ex
Expand All @@ -729,6 +742,7 @@ jobs:
steps:
- checkout_merge
- designate_upload_channel
- install_cuda_compatible_cmath
- run:
command: |
set -ex
Expand Down
5 changes: 5 additions & 0 deletions .circleci/scripts/vs_install_cmath.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$CMATH_DOWNLOAD_LINK = "https://raw.githubusercontent.com/microsoft/STL/12c684bba78f9b032050526abdebf14f58ca26a3/stl/inc/cmath"
$VC14_28_INSTALL_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include"

curl.exe --retry 3 -kL $CMATH_DOWNLOAD_LINK --output "$home\cmath"
Move-Item -Path "$home\cmath" -Destination "$VC14_28_INSTALL_PATH" -Force

0 comments on commit 5aa76e4

Please sign in to comment.