Skip to content

Commit 35465ed

Browse files
authored
Fix CI for macos (#5142)
Due to compiler bugs present in the latest version of clang on macos: Roll back macos version used by github actions from `macos-latest` (`macos-14`) to `macos-13`: Some modulo operations were failing, such as `-1 % -1` when compiler optimizations were enabled Disable `-Wliteral-range` for test-math.c on macos, because it was falsely raised for `isnan`, `isinf`, and `isfinite ` macros. JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi [email protected]
1 parent 47bd5d4 commit 35465ed

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/gh-actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- run: $RUNNER -q --jerry-tests --buildoptions=--compile-flag=-m32,--cpointer-32bit=on --build-debug
5858

5959
OSX_x86-64_Build_Correctness_Unit_Tests:
60-
runs-on: macos-latest
60+
runs-on: macos-13
6161
steps:
6262
- uses: actions/checkout@v2
6363
- uses: actions/setup-python@v4
@@ -67,7 +67,7 @@ jobs:
6767
- run: $RUNNER -q --unittests
6868

6969
OSX_x86-64_Build_Correctness_Unit_Tests_Debug:
70-
runs-on: macos-latest
70+
runs-on: macos-13
7171
steps:
7272
- uses: actions/checkout@v2
7373
- uses: actions/setup-python@v4

tests/unit-math/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ foreach(SOURCE_UNIT_TEST_MAIN ${SOURCE_UNIT_TEST_MAIN_MODULES})
3030
add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_MAIN})
3131
set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
3232
set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
33+
if("${PLATFORM}" STREQUAL "DARWIN")
34+
set_property(TARGET ${TARGET_NAME} PROPERTY COMPILE_OPTIONS "-Wno-literal-range")
35+
endif()
3336

3437
target_link_libraries(${TARGET_NAME} jerry-math)
3538

0 commit comments

Comments
 (0)