diff options
author | Máté Tokodi <mate.tokodi@szteszoftver.hu> | 2024-05-24 18:34:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-24 18:34:26 +0200 |
commit | 35465ed78ef3152a62452cabb367d04cb6ebbbbb (patch) | |
tree | 85324d1cc482b9442f130ec5c6391b89d95daddf | |
parent | 47bd5d4b910a41fdc517e39edcf9220d8030a61f (diff) |
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 mate.tokodi@szteszoftver.hu
-rw-r--r-- | .github/workflows/gh-actions.yml | 4 | ||||
-rw-r--r-- | tests/unit-math/CMakeLists.txt | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index f2db5d11..85d5659f 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -57,7 +57,7 @@ jobs: - run: $RUNNER -q --jerry-tests --buildoptions=--compile-flag=-m32,--cpointer-32bit=on --build-debug OSX_x86-64_Build_Correctness_Unit_Tests: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v4 @@ -67,7 +67,7 @@ jobs: - run: $RUNNER -q --unittests OSX_x86-64_Build_Correctness_Unit_Tests_Debug: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v4 diff --git a/tests/unit-math/CMakeLists.txt b/tests/unit-math/CMakeLists.txt index d456731d..10ca9525 100644 --- a/tests/unit-math/CMakeLists.txt +++ b/tests/unit-math/CMakeLists.txt @@ -30,6 +30,9 @@ foreach(SOURCE_UNIT_TEST_MAIN ${SOURCE_UNIT_TEST_MAIN_MODULES}) add_executable(${TARGET_NAME} ${SOURCE_UNIT_TEST_MAIN}) set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}") set_property(TARGET ${TARGET_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests") + if("${PLATFORM}" STREQUAL "DARWIN") + set_property(TARGET ${TARGET_NAME} PROPERTY COMPILE_OPTIONS "-Wno-literal-range") + endif() target_link_libraries(${TARGET_NAME} jerry-math) |