Thanks! Both methods are great to know. I have another way dealing with vcvarsall.bat is that running buildbot-worker in the same command prompt after running vcvarsall.bat. But again still not answering the question of sharing state between steps.
On Tue, May 7, 2019 at 3:14 PM Hugh Sorby <h.so...@auckland.ac.nz> wrote: > > I set the worker properties with the following: > > > self._properties['env'] = {'APPVER': '6.1', 'CL': '/AI C:\\Windows > \\Microsoft.NET\\Framework64\\v4.0.30319', 'CommandPromptType': 'Native', > > 'Configuration': 'Release', > 'CURRENT_CPU': 'x64', 'FrameworkVersion': 'v4.0.30319', > > 'INCLUDE': ['C:\\Program Files > (x86)\\Microsoft > Visual Studio 10.0\\VC\\INCLUDE', 'C:\\Program Files\\Microsoft SDKs\\ > Windows\\v7.1\\INCLUDE', 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1 > \\INCLUDE\\gl'], > > 'LIB': ['C:\\Program Files (x86)\\Microsoft > Visual Studio 10.0\\VC\\Lib\\amd64', 'C:\\Program Files\\Microsoft SDKs\\ > Windows\\v7.1\\Lib\\X64'], > > 'LIBPATH': ['C:\\Windows\\Microsoft.NET > \\Framework64\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework\\ > v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework64\\v3.5', 'C:\\Windows > \\Microsoft.NET\\Framework\\v3.5', 'C:\\Program Files (x80\\VC\\Lib\\ > amd64'], > > 'PATH': ['C:\\Windows\\Microsoft.NET\\ > Framework64\\v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework\\ > v4.0.30319', 'C:\\Windows\\Microsoft.NET\\Framework64\\v3.5', 'C:\\Windows > \\Microsoft.NET\\Framework\\v3.5', 'C:\\Program Files (x86)\\ommon7\\IDE', > 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools', > 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\amd64', > 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Bin\\VCPacoft > SDKs\\Windows\\v7.1\\Bin\\NETFX 4.0 Tools\\x64', 'C:\\Program Files\\Microsoft > SDKs\\Windows\\v7.1\\Bin\\x64', 'C:\\Program Files\\Microsoft SDKs\\ > Windows\\v7.1\\Bin', 'C:\\python27', 'C:\\python27\\Scripts', 'C:\\ > python34', 'C:\\python34\\Scripts', 'C:\\cygwin64\\bin', '${PATH}'], > > 'PlatformToolset': 'Windows7.1SDK', > 'sdkdir': 'C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\', > > 'TARGET_CPU': 'x64', 'TARGET_PLATFORM': > 'WIN7', 'ToolsVersion': '4.0', > > 'WindowsSDKDir': 'C:\\Program > Files\\Microsoft > SDKs\\Windows\\v7.1\\', 'WindowsSDKVersionOverride': 'v7.1'} > > > It is a bit of a pain getting it done initially but then the environment > is well controlled under the execution of the factory build steps. I have > found this to be the best way for me. It is much better than trying to run > vcvarsall.bat at every step. > > > ------------------------------ > *From:* users <users-boun...@buildbot.net> on behalf of Greg Bullock < > g...@nwra.com> > *Sent:* Wednesday, May 8, 2019 8:55 AM > *To:* users@buildbot.net > *Subject:* Re: [us...@bb.net] Question on passing state between steps > > > I faced a similar problem. To work around it, I have a batch file (see > below) to run consecutively all the steps that need to share the > environment. > > It's not perfect. In particular, I've had trouble getting useful > stdout/stderr logs and error code back to the builder when one of the steps > fails. > > I'd appreciate your sharing back any improvements you make on this. > > > echo off > setlocal > > set THREAD_CFG=%~1 > if /i "%~1"=="" set THREAD_CFG=single > set LIB_LINKING=%~2 > if /i "%~2"=="" set LIB_LINKING=shared > set CMAKE_BUILD_TYPE=%~3 > if /i "%~3"=="" set CMAKE_BUILD_TYPE=Release > set PROJ_FOLDER=%~4 > if /i "%~4"=="" set PROJ_FOLDER=Main_Project > > :: For the log, show the command line we're about to run > set a_cmd=cd ..\build_out > echo %a_cmd% > %a_cmd% > > :: For the log, show the command line we're about to run > set a_cmd=set path=C:\Program Files > (x86)\CMake\bin;G:\TDM-GCC-64\bin;%path% > :: set a_cmd=set path=C:\Program Files (x86)\CMake\bin;%path% > echo %a_cmd% > %a_cmd% > > echo %path% > :: set path=G:\TDM-GCC-64\bin;%path% -- The TDM builds cause a runtime > error. Disable for now. > :: set > path=G:\mingw-w64\x86_64-5.4.0-posix-seh-rt_v5-rev0\mingw64\bin;%path% -- > Should not be necessary, as it's on the buildbot BuilderConfig PATH > environment variable. > > :: For the log, show the command line we're about to run > set a_cmd=cmake -G "MinGW Makefiles" -DCMAKE_Threading="%THREAD_CFG%" > -DLIB_LINKING="%LIB_LINKING%" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" > ..\build\Projects\cmake\%PROJ_FOLDER% > echo %a_cmd% > %a_cmd% > > :: For the log, show the command line we're about to run > set a_cmd=mingw32-make > echo %a_cmd% > %a_cmd% > > endlocal > > > > On 5/7/2019 1:22 PM, Trung Tran wrote: > > I current doing a simple build steps that include > "Setup enviroments" (running vcvarsall.bat") > "Run Cmake" > "Run MsBuild" > I notice that all steps are not sharing any state between them. This is > the issue for my setup environment steps because I need that for both sub > sequence step. > What is the right way to do this? > > > _______________________________________________ > users mailing > listusers@buildbot.nethttps://lists.buildbot.net/mailman/listinfo/users > > -- > Greg Bullock > NorthWest Research Associates > 301 Webster St. > Monterey, CA 93940 > (831) 582-4907g...@nwra.com > > _______________________________________________ > users mailing list > users@buildbot.net > https://lists.buildbot.net/mailman/listinfo/users
_______________________________________________ users mailing list users@buildbot.net https://lists.buildbot.net/mailman/listinfo/users