Skip to content

Commit ddcd30b

Browse files
committed
add CUPY_RELEASE_NO_CLONE env var
1 parent 444393b commit ddcd30b

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.pfnci/wheel-windows/build.ps1

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@ echo " PATH: $Env:PATH"
4848
echo ">> Python Version:"
4949
RunOrDie python -V
5050

51-
# Branch to be built.
52-
if ($branch -eq "") {
53-
$branch = Get-Content "./.pfnci/BRANCH"
54-
}
55-
echo ">> Using Branch: $branch"
56-
5751
# Clone CuPy and checkout the target branch
58-
RunOrDie git clone --recursive --branch $branch --depth 1 https://github.com/cupy/cupy.git cupy
59-
RunOrDie git -C cupy config core.symlinks true
60-
RunOrDie git -C cupy reset --hard
52+
if ($Env:CUPY_RELEASE_NO_CLONE -eq "1") {
53+
echo ">> CUPY_RELEASE_NO_CLONE=1 is set. Using CuPy source tree in the current directory"
54+
} else {
55+
echo ">> Cloning CuPy..."
56+
if ($branch -eq "") {
57+
$branch = Get-Content "./.pfnci/BRANCH"
58+
echo ">> Using CuPy branch that matches with the current cupy-release-tools: $branch"
59+
} else {
60+
echo ">> Using specified CuPy branch: $branch"
61+
}
62+
RunOrDie git clone --recursive --branch $branch --depth 1 https://github.com/cupy/cupy.git cupy
63+
RunOrDie git -C cupy config core.symlinks true
64+
RunOrDie git -C cupy reset --hard
65+
}
6166

6267
# Get Cython version from configuration.
6368
$cython_version = @(python -c "import dist_config; print(dist_config.CYTHON_VERSION)")

0 commit comments

Comments
 (0)