From c3353fdce427d32337e4670846f05bbbb99bfda1 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 2 Aug 2024 08:24:52 +0100 Subject: [PATCH 1/3] [ci] Add mac arm64 tests tmp tmp --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95fef34..7c1f813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,13 +7,15 @@ jobs: strategy: fail-fast: false matrix: - os: [linux, macos] + os: [linux, macos, macos-arm64] lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, luajit=2.1] include: - os: linux runner: ubuntu-22.04 - os: macos runner: macos-13 + - os: macos-arm64 + runner: macos-14 name: ${{ matrix.os }} (${{ matrix.lua }}) runs-on: ${{ matrix.runner }} steps: From 01a2d50b7006b1266da38517468dc55172275977 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 2 Aug 2024 08:36:38 +0100 Subject: [PATCH 2/3] Use provided define for simdjson implementation On arm64, the arm64 implementation is used instead of fallback, so we shoudn't hardcode it. --- src/luasimdjson.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/luasimdjson.cpp b/src/luasimdjson.cpp index ca598c1..dc4893c 100644 --- a/src/luasimdjson.cpp +++ b/src/luasimdjson.cpp @@ -76,15 +76,15 @@ void convert_ondemand_element_to_table(lua_State *L, ondemand::value element) { ondemand::number number = element.get_number(); ondemand::number_type number_type = number.get_number_type(); switch (number_type) { - case fallback::number_type::floating_point_number: + case SIMDJSON_BUILTIN_IMPLEMENTATION::number_type::floating_point_number: lua_pushnumber(L, element.get_double()); break; - case fallback::number_type::signed_integer: + case SIMDJSON_BUILTIN_IMPLEMENTATION::number_type::signed_integer: lua_pushinteger(L, element.get_int64()); break; - case fallback::number_type::unsigned_integer: + case SIMDJSON_BUILTIN_IMPLEMENTATION::number_type::unsigned_integer: { // a uint64 can be greater than an int64, so we must check how large and pass as a number // if larger but LUA_MAXINTEGER (which is only defined in 5.3+) @@ -101,7 +101,7 @@ void convert_ondemand_element_to_table(lua_State *L, ondemand::value element) { break; } - case fallback::number_type::big_integer: + case SIMDJSON_BUILTIN_IMPLEMENTATION::number_type::big_integer: lua_pushnumber(L, element.get_double()); break; } From 21eec8d87acb38e12d6c677698c6aaa02c552a5e Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 2 Aug 2024 08:43:27 +0100 Subject: [PATCH 3/3] [ci] Avoid running luajit=2.0 on arm64 Only 2.1+ has arm64 support --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c1f813..0441d22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,9 @@ jobs: runner: macos-13 - os: macos-arm64 runner: macos-14 + exclude: + - os: macos-arm64 + lua: luajit=2.0 name: ${{ matrix.os }} (${{ matrix.lua }}) runs-on: ${{ matrix.runner }} steps: