Fix & Parallelize the CI pipelines (#415)
* Call the right script * Testing to see if we can run tests in parallel * Testing to see if this might help * Is this the right format? * Just testing... * Okay, fine * Disabling Clang ASan on x64 for now * Here goes nothing * How about this/ * Do arrays like this work? * Is it because I was missing a colon? * More colons? * Okay, now? * Try split again * I can't spell
This commit is contained in:
Родитель
572b872892
Коммит
0d4d4d80ca
|
@ -7,50 +7,44 @@ jobs:
|
|||
- job: BuildAndTest
|
||||
timeoutInMinutes: 360
|
||||
|
||||
variables:
|
||||
compilers: 'clang,msvc'
|
||||
architectures: 'x86,x64'
|
||||
buildTypes: 'debug,relwithdebinfo'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
${{each compiler in split(variables.compilers, ',')}}:
|
||||
${{each arch in split(variables.architectures, ',')}}:
|
||||
${{each buildType in split(variables.buildTypes, ',')}}:
|
||||
${{compiler}}-${{arch}}-${{buildType}}:
|
||||
compiler: ${{compiler}}
|
||||
arch: ${{arch}}
|
||||
build-type: ${{buildType}}
|
||||
|
||||
pool:
|
||||
vmImage: 'windows-2022'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
choco install llvm
|
||||
choco upgrade llvm -y --version=17.0.6
|
||||
if %ERRORLEVEL% NEQ 0 goto :eof
|
||||
echo ##vso[task.setvariable variable=PATH]%PATH%;C:\Program Files\LLVM\bin
|
||||
displayName: 'Install Clang'
|
||||
condition: eq(variables['compiler'], 'clang')
|
||||
|
||||
- script: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
|
||||
call scripts\call-vcvars.cmd $(arch)
|
||||
if %ERRORLEVEL% NEQ 0 goto :eof
|
||||
|
||||
call scripts\init_all.cmd --fast
|
||||
call scripts\init.cmd -c $(compiler) -b $(build-type) --fast
|
||||
if %ERRORLEVEL% NEQ 0 goto :eof
|
||||
|
||||
call scripts\build_all.cmd
|
||||
displayName: 'Build x86'
|
||||
displayName: 'Build $(compiler) $(arch)$(build-type)'
|
||||
|
||||
# NOTE: We run the tests in the 32-bit cross-tools window out of convenience as this adds all necessary directories to
|
||||
# the PATH that are necessary for finding the ASan/UBSan DLLs
|
||||
- script: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat""
|
||||
call scripts\call-vcvars.cmd $(arch)
|
||||
set ASAN_WIN_CONTINUE_ON_INTERCEPTION_FAILURE=1
|
||||
call scripts\runtests.cmd ~[LocalOnly]
|
||||
displayName: 'Run x86 Tests'
|
||||
|
||||
- script: |
|
||||
rmdir /s /q build
|
||||
displayName: 'Clean x86 Output'
|
||||
|
||||
- script: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
if %ERRORLEVEL% NEQ 0 goto :eof
|
||||
|
||||
call scripts\init_all.cmd --fast
|
||||
if %ERRORLEVEL% NEQ 0 goto :eof
|
||||
|
||||
call scripts\build_all.cmd
|
||||
displayName: 'Build x64'
|
||||
|
||||
# NOTE: We run the tests in the 32-bit cross-tools window out of convenience as this adds all necessary directories to
|
||||
# the PATH that are necessary for finding the ASan/UBSan DLLs
|
||||
- script: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat""
|
||||
call scripts\runtests.cmd ~[LocalOnly]
|
||||
displayName: 'Run x64 Tests'
|
||||
displayName: 'Test $(compiler) $(arch)$(build-type)'
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
@echo off
|
||||
|
||||
:: NOTE: Intentionally not specifying 'setlocal' as we want the side-effects of calling 'vcvars' to affect the caller
|
||||
|
||||
:: NOTE: This is primarily intended to be used by the bulid pipelines, hence the hard-coded paths, and might not be
|
||||
:: generally useful. The following check is intended to help diagnose such possible issues
|
||||
if NOT EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
echo ERROR: Could not locate 'vcvars' batch file. This script is intended to be run from a build machine & exit /B 1
|
||||
)
|
||||
|
||||
if /I "%1"=="x86" (
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
|
||||
) else if /I "%1"=="x64" (
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else echo ERROR: Requires one of 'x86' or 'x64' & exit /B 1
|
|
@ -87,6 +87,7 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||
set(HAS_DEBUG_INFO TRUE)
|
||||
endif()
|
||||
# Release & MinSizeRel => keep all false
|
||||
|
||||
set(ASAN_AVAILABLE FALSE)
|
||||
set(UBSAN_AVAILABLE FALSE)
|
||||
|
@ -94,8 +95,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|||
# Address Sanitizer is available for all architectures and build types, but warns/errors if debug info is not enabled
|
||||
set(ASAN_AVAILABLE ${HAS_DEBUG_INFO})
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Address Sanitizer is not available with debug libraries
|
||||
set(ASAN_AVAILABLE NOT ${DEBUG_BUILD})
|
||||
# Sanitizers are not available with debug libraries
|
||||
# Starting with Clang 17, there appears to be some issue where linking to the dynamic asan libraries seems to think that
|
||||
# things like 'operator new' are present in the executable, but only for x64 for some reason
|
||||
set(ASAN_AVAILABLE NOT ${DEBUG_BUILD} AND $ENV{Platform} STREQUAL "x86")
|
||||
set(UBSAN_AVAILABLE NOT ${DEBUG_BUILD})
|
||||
endif()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче