Skip to content

Commit 6139ec2

Browse files
authored
[CI] Fix windows wheels versioning (#1436)
1 parent 2c0794c commit 6139ec2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/scripts/version_script.bat

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if "%GITHUB_REF_TYPE%"=="branch" (
99
if not errorlevel 1 (
1010
echo Setting static version for release branch: %GITHUB_REF_NAME%
1111
set TENSORDICT_BUILD_VERSION=%BASE_VERSION%
12-
set SETUPTOOLS_SCM_PRETEND_VERSION=%TENSORDICT_BUILD_VERSION%
12+
set SETUPTOOLS_SCM_PRETEND_VERSION=%BASE_VERSION%
1313
goto setup_build
1414
)
1515
)
@@ -19,7 +19,7 @@ if "%GITHUB_REF_TYPE%"=="tag" (
1919
if not errorlevel 1 (
2020
echo Setting static version for release candidate tag: %GITHUB_REF_NAME%
2121
set TENSORDICT_BUILD_VERSION=%BASE_VERSION%
22-
set SETUPTOOLS_SCM_PRETEND_VERSION=%TENSORDICT_BUILD_VERSION%
22+
set SETUPTOOLS_SCM_PRETEND_VERSION=%BASE_VERSION%
2323
goto setup_build
2424
)
2525
)
@@ -61,6 +61,11 @@ set TENSORDICT_BUILD_VERSION=%DEV_VERSION%
6161

6262
:setup_build
6363
echo TENSORDICT_BUILD_VERSION is set to %TENSORDICT_BUILD_VERSION%
64+
echo SETUPTOOLS_SCM_PRETEND_VERSION is set to %SETUPTOOLS_SCM_PRETEND_VERSION%
65+
echo DEBUG: About to run build command with version environment
66+
echo DEBUG: BASE_VERSION = %BASE_VERSION%
67+
echo DEBUG: Environment variable check...
68+
set | findstr SETUPTOOLS_SCM
6469

6570
if "%CONDA_RUN%"=="" (
6671
echo CONDA_RUN is not set. Please activate your conda environment or set CONDA_RUN.
@@ -101,6 +106,7 @@ if "%CU_VERSION%" == "xpu" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat
101106

102107
set DISTUTILS_USE_SDK=1
103108

109+
REM Capture all arguments passed to this script
104110
set args=%1
105111
shift
106112
:start
@@ -110,9 +116,6 @@ shift
110116
goto start
111117

112118
:done
113-
if "%args%" == "" (
114-
echo Usage: vc_env_helper.bat [command] [args]
115-
echo e.g. vc_env_helper.bat cl /c test.cpp
116-
)
117-
119+
REM Execute the build command with environment variables set
120+
echo Executing build command: %args%
118121
%args% || exit /b 1

.github/workflows/build-wheels-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ jobs:
5151
package-name: ${{ matrix.package-name }}
5252
smoke-test-script: ${{ matrix.smoke-test-script }}
5353
trigger-event: ${{ github.event_name }}
54+
build-platform: python-build-package

0 commit comments

Comments
 (0)