Skip to content

Commit

Permalink
Timeout and OSX debug library type
Browse files Browse the repository at this point in the history
Prevent tests from failing on OSX debug builds, by setting timeouts and
forcing static library build.

Shared library issue is described in #5876.
  • Loading branch information
ppenzin committed Dec 28, 2020
1 parent fb5ab5e commit 0defab7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
39 changes: 20 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,32 @@ if(NOT CHAKRACORE_BUILD_SH)
option(INTL_ICU "Enable Intl" ON)
option(EMBED_ICU "Build ICU within ChakraCore build" OFF)
set(ICU_INCLUDE_PATH "" CACHE STRING "libicu iclude path")
endif(NOT CHAKRACORE_BUILD_SH)
else(NOT CHAKRACORE_BUILD_SH)

# Keep CMake from caching static/shared library
# option. Otherwise, CMake fails to update cached
# references
# Keep CMake from caching static/shared library
# option. Otherwise, CMake fails to update cached
# references

# todo: create a sub cmake file to take care of _SH uncaching...
if(SHARED_LIBRARY_SH)
# todo: create a sub cmake file to take care of _SH uncaching...
if(SHARED_LIBRARY_SH)
unset(SHARED_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY CACHE)
set(SHARED_LIBRARY 1)
endif()
unset(STATIC_LIBRARY CACHE)
set(SHARED_LIBRARY 1)
endif()

if(STATIC_LIBRARY_SH)
unset(SHARED_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY_SH CACHE)
unset(SHARED_LIBRARY CACHE)
set(STATIC_LIBRARY 1)
endif()
if(STATIC_LIBRARY_SH)
unset(SHARED_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY_SH CACHE)
unset(SHARED_LIBRARY CACHE)
set(STATIC_LIBRARY 1)
endif()

if(LIBS_ONLY_BUILD_SH)
unset(LIBS_ONLY_BUILD_SH CACHE)
set(CC_LIBS_ONLY_BUILD 1)
endif()
if(LIBS_ONLY_BUILD_SH)
unset(LIBS_ONLY_BUILD_SH CACHE)
set(CC_LIBS_ONLY_BUILD 1)
endif()
endif(NOT CHAKRACORE_BUILD_SH)

if(CC_USES_SYSTEM_ARCH_SH OR NOT CHAKRACORE_BUILD_SH)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
Expand Down
11 changes: 9 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,45 @@ trigger:

jobs:
- job: CMake
timeoutInMinutes: 0
timeoutInMinutes: 120
strategy:
matrix:
Linux.Debug:
image_name: 'ubuntu-latest'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Debug'
test_target: 'check'
libtype_flag: ''
Linux.ReleaseWithDebug:
image_name: 'ubuntu-latest'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'RelWithDebInfo'
test_target: 'check'
libtype_flag: ''
Linux.Release:
image_name: 'ubuntu-latest'
deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
build_type: 'Release'
test_target: 'all'
libtype_flag: ''
OSX.Debug:
image_name: 'macOS-latest'
deps: 'brew install ninja icu4c'
build_type: 'Debug'
test_target: 'check'
libtype_flag: '-DSTATIC_LIBRARY=ON'
OSX.ReleaseWithDebug:
image_name: 'macOS-latest'
deps: 'brew install ninja icu4c'
build_type: 'RelWithDebInfo'
test_target: 'check'
libtype_flag: ''
OSX.Release:
image_name: 'macOS-latest'
deps: 'brew install ninja icu4c'
build_type: 'Release'
test_target: 'all'
libtype_flag: ''

pool:
vmImage: $(image_name)
Expand All @@ -51,10 +57,11 @@ jobs:
- script: |
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $(LIBTYPE) -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
displayName: CMake
env:
BUILD_TYPE: $(build_type)
LIBTYPE: $(libtype_flag)
- script: |
cd build
Expand Down

0 comments on commit 0defab7

Please sign in to comment.