Skip to content

Commit

Permalink
[az_pipeline_ci] windows: allow parallel build for airlib, fix update…
Browse files Browse the repository at this point in the history
…_from_git
  • Loading branch information
madratman committed Jul 20, 2020
1 parent dc78f32 commit 7017d84
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
34 changes: 34 additions & 0 deletions Unreal/Environments/Blocks/update_from_git_ci.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off
REM //---------- set up variable ----------
setlocal
set ROOT_DIR=%~dp0

set AirSimPath=%1

REM default path works for Blocks environment
if "%AirSimPath%"=="" set "AirSimPath=..\..\.."

IF NOT EXIST "%AirSimPath%" (
echo "AirSimPath %AirSimPath% was not found"
goto :failed
)

echo Using AirSimPath = %AirSimPath%

robocopy /MIR "%AirSimPath%\Unreal\Plugins\AirSim" Plugins\AirSim /XD temp *. /njh /njs /ndl /np
robocopy /MIR "%AirSimPath%\AirLib" Plugins\AirSim\Source\AirLib /XD temp *. /njh /njs /ndl /np
robocopy /njh /njs /ndl /np "%AirSimPath%\Unreal\Environments\Blocks" "." *.bat
robocopy /njh /njs /ndl /np "%AirSimPath%\Unreal\Environments\Blocks" "." *.sh
rem robocopy /njh /njs /ndl /np "%AirSimPath%" "." *.gitignore

REM cmd /c clean.bat
REM cmd /c GenerateProjectFiles.bat

goto :done

:failed
echo Error occured while updating.
exit /b 1

:done
REM if "%1"=="" pause
8 changes: 4 additions & 4 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ IF NOT EXIST AirLib\deps\eigen3 goto :buildfailed

REM //---------- now we have all dependencies to compile AirSim.sln which will also compile MavLinkCom ----------
if "%buildMode%" == "--Debug" (
msbuild /p:Platform=x64 /p:Configuration=Debug AirSim.sln
msbuild -maxcpucount:12 /p:Platform=x64 /p:Configuration=Debug AirSim.sln
if ERRORLEVEL 1 goto :buildfailed
) else if "%buildMode%" == "--Release" (
msbuild /p:Platform=x64 /p:Configuration=Release AirSim.sln
msbuild -maxcpucount:12 /p:Platform=x64 /p:Configuration=Release AirSim.sln
if ERRORLEVEL 1 goto :buildfailed
) else (
msbuild /p:Platform=x64 /p:Configuration=Debug AirSim.sln
msbuild -maxcpucount:12 /p:Platform=x64 /p:Configuration=Debug AirSim.sln
if ERRORLEVEL 1 goto :buildfailed
msbuild /p:Platform=x64 /p:Configuration=Release AirSim.sln
msbuild -maxcpucount:12 /p:Platform=x64 /p:Configuration=Release AirSim.sln
if ERRORLEVEL 1 goto :buildfailed
)

Expand Down
4 changes: 2 additions & 2 deletions pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ stages:
- script: |
call "C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
call .\update_from_git.bat
call .\update_from_git_ci.bat
workingDirectory: Unreal/Environments/Blocks
displayName: Copy AirLib to Blocks (update_from_git.bat)
displayName: Copy AirLib to Blocks (update_from_git_ci.bat)
# Build Blocks
- script: |
Expand Down

0 comments on commit 7017d84

Please sign in to comment.