Skip to content

Commit

Permalink
Merge pull request #137 from mattip/v2.9.0-windows
Browse files Browse the repository at this point in the history
unskip windows build
  • Loading branch information
mattip authored Jan 26, 2024
2 parents 33169db + 3fe2aed commit 1995bf3
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 13 deletions.
61 changes: 61 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .ci_support/win_64_python3.10.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
curl:
- '8'
cxx_compiler:
- vs2019
libgrpc:
- '1.59'
nodejs:
- '18'
- '20'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.10.* *_cpython
target_platform:
- win-64
23 changes: 23 additions & 0 deletions .ci_support/win_64_python3.11.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
curl:
- '8'
cxx_compiler:
- vs2019
libgrpc:
- '1.59'
nodejs:
- '18'
- '20'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.11.* *_cpython
target_platform:
- win-64
23 changes: 23 additions & 0 deletions .ci_support/win_64_python3.8.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
curl:
- '8'
cxx_compiler:
- vs2019
libgrpc:
- '1.59'
nodejs:
- '18'
- '20'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.8.* *_cpython
target_platform:
- win-64
23 changes: 23 additions & 0 deletions .ci_support/win_64_python3.9.____cpython.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
curl:
- '8'
cxx_compiler:
- vs2019
libgrpc:
- '1.59'
nodejs:
- '18'
- '20'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.9.* *_cpython
target_platform:
- win-64
5 changes: 5 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 9 additions & 11 deletions recipe/build-core.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ echo dir %BAZEL_VC%
dir "%BAZEL_VC%"

echo ==========================================================
echo calling bash to build
echo calling pip to install
echo ==========================================================

rem cd python
rem "%PYTHON%" -m pip install . -vv

powershell ci/pipeline/fix-windows-bazel.ps1
%BAZEL_SH% echo "startup --output_user_root=c:/tmp" >> ~/.bazelrc
%BAZEL_SH% ci/ci.sh init
%BAZEL_SH% ci/ci.sh build
cd python
rem This requires patch 0006
echo startup --output_user_root=D:/tmp >> ..\.bazelrc
"%PYTHON%" -m pip install . -vv

rem remember the return code
set RETCODE=%ERRORLEVEL%
Expand All @@ -33,8 +29,10 @@ rem different Python version) do not stumble on some after-effects.
"%PYTHON%" setup.py clean --all

rem Now shut down Bazel server, otherwise Windows would not allow moving a directory with it
bazel "--output_user_root=%SRC_DIR%\..\bazel-root" "--output_base=%SRC_DIR%\..\b-o" clean
bazel "--output_user_root=%SRC_DIR%\..\bazel-root" "--output_base=%SRC_DIR%\..\b-o" shutdown
rem bazel "--output_user_root=%SRC_DIR%\..\bazel-root" "--output_base=%SRC_DIR%\..\b-o" clean
bazel clean
rem bazel "--output_user_root=%SRC_DIR%\..\bazel-root" "--output_base=%SRC_DIR%\..\b-o" shutdown
bazel shutdown
rd /s /q "%SRC_DIR%\..\b-o" "%SRC_DIR%\..\bazel-root"
rem Ignore "bazel shutdown" errors
exit /b %RETCODE%
4 changes: 2 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ source:
- patches/0007-ci-upgrade-ray-openssl.patch
# xref https://github.com/ray-project/ray/pull/42557
# xref https://github.com/ray-project/ray/issues/42560
- patches/0006-remove-bazel-command-line-output-directory-override.patch # [win]

build:
number: 0
skip: true # [win]
number: 1

# Need these up here for conda-smithy to handle them properly.
requirements:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From e06f87d932ed2a44e2ddc842110ecc855e952a86 Mon Sep 17 00:00:00 2001
From: Matti Picus <matti.picus@gmail.com>
Date: Sun, 21 Jan 2024 18:42:39 +0200
Subject: [PATCH 6/7] remove bazel command line output directory override

---
python/setup.py | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index 0aa524af1b..531a78eade 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -469,20 +469,7 @@ def build(build_python, build_java, build_cpp):
if not is_automated_build:
bazel_precmd_flags = []
if is_automated_build:
- root_dir = os.path.join(
- os.path.abspath(os.environ["SRC_DIR"]), "..", "bazel-root"
- )
- out_dir = os.path.join(os.path.abspath(os.environ["SRC_DIR"]), "..", "b-o")
-
- for d in (root_dir, out_dir):
- if not os.path.exists(d):
- os.makedirs(d)
-
- bazel_precmd_flags = [
- "--output_user_root=" + root_dir,
- "--output_base=" + out_dir,
- ]
-
+ bazel_precmd_flags = []
if is_native_windows_or_msys():
bazel_flags.append("--enable_runfiles=false")

--
2.33.0.windows.2

0 comments on commit 1995bf3

Please sign in to comment.