forked from FourierTransformer/lua-simdjson
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tobil4sk/update
Update with latest lua-simdjson changes
- Loading branch information
Showing
19 changed files
with
167,762 additions
and
16,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lua: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
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 | ||
exclude: | ||
- os: macos-arm64 | ||
lua: luajit=2.0 | ||
name: ${{ matrix.os }} (${{ matrix.lua }}) | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
# Checks-out the repository under $GITHUB_WORKSPACE. | ||
- uses: actions/checkout@v4 | ||
- name: Install Lua (${{ matrix.lua }}) | ||
run: | | ||
pip install hererocks | ||
hererocks lua_install -r^ --${{ matrix.lua }} | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 11.0 | ||
- name: Build lua-simdjson | ||
run: | | ||
source lua_install/bin/activate | ||
luarocks make | ||
# - name: Run tests | ||
# run: | | ||
# source lua_install/bin/activate | ||
# luarocks install lua-cjson2 | ||
# luarocks install busted | ||
# busted --verbose | ||
|
||
windows: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, luajit=2.1] | ||
runs-on: windows-2022 | ||
steps: | ||
# Checks-out the repository under $GITHUB_WORKSPACE. | ||
- uses: actions/checkout@v4 | ||
- name: Install Lua (${{ matrix.lua }}) | ||
run: | | ||
pip install hererocks | ||
hererocks lua_install -r@3a142ce --${{ matrix.lua }} | ||
- name: Build lua-simdjson | ||
run: | | ||
.\lua_install\bin\activate | ||
luarocks make | ||
# - name: Run tests | ||
# run: | | ||
# .\lua_install\bin\activate | ||
# luarocks install lua-cjson2 | ||
# luarocks install busted | ||
# busted --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
test/ | ||
*.so | ||
*.dll | ||
*.o | ||
*.d | ||
*.src.rock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,41 @@ | ||
SRC = src/hxluasimdjson.cpp src/simdjson.cpp | ||
INCLUDE = -I$(LUA_INCDIR) | ||
LIBS_PATH = -L$(LUA_LIBDIR) | ||
LIBS = -lpthread | ||
FLAGS = -std=c++11 -Wall $(LIBFLAG) $(CFLAGS) | ||
OBJ = src/hxluasimdjson.o src/simdjson.o | ||
CPPFLAGS = -I$(LUA_INCDIR) | ||
CXXFLAGS = -std=c++11 -Wall $(CFLAGS) | ||
LDFLAGS = $(LIBFLAG) | ||
LDLIBS = -lpthread | ||
|
||
all: hxsimdjson.so | ||
ifdef LUA_LIBDIR | ||
LDLIBS += $(LUA_LIBDIR)/$(LUALIB) | ||
endif | ||
|
||
hxsimdjson.so: | ||
$(CXX) $(SRC) $(FLAGS) $(INCLUDE) $(LIBS_PATH) $(LIBS) -o $@ | ||
ifeq ($(OS),Windows_NT) | ||
LIBEXT = dll | ||
else | ||
UNAME := $(shell uname -s) | ||
ifeq ($(findstring MINGW,$(UNAME)),MINGW) | ||
LIBEXT = dll | ||
else ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | ||
LIBEXT = dll | ||
else | ||
LIBEXT = so | ||
endif | ||
endif | ||
|
||
TARGET = hxsimdjson.$(LIBEXT) | ||
|
||
all: $(TARGET) | ||
|
||
DEP_FILES = $(OBJ:.o=.d) | ||
-include $(DEP_FILES) | ||
|
||
%.o: %.cpp | ||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MP -c $< -o $@ | ||
|
||
$(TARGET): $(OBJ) | ||
$(CXX) $(LDFLAGS) $^ -o $@ $(LDLIBS) | ||
|
||
clean: | ||
rm *.so | ||
rm -f *.$(LIBEXT) src/*.{o,d} | ||
|
||
install: hxsimdjson.so | ||
cp hxsimdjson.so $(INST_LIBDIR) | ||
install: $(TARGET) | ||
cp $(TARGET) $(INST_LIBDIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
true trailing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[nil] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[nully] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nully trailing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"hello world" |
Oops, something went wrong.