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 list
users@buildbot.net
https://lists.buildbot.net/mailman/listinfo/users

--
Greg Bullock
NorthWest Research Associates
301 Webster St.
Monterey, CA  93940
(831) 582-4907
g...@nwra.com

_______________________________________________
users mailing list
users@buildbot.net
https://lists.buildbot.net/mailman/listinfo/users

Reply via email to