testing on freebsd (#768)

* Adding cirrus tests
* Adding cirrus badge.
This commit is contained in:
Daniel Lemire 2020-04-22 21:22:09 -04:00 committed by GitHub
parent 44544635dd
commit f0ac55ec0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 11 deletions

View File

@ -12,12 +12,10 @@ task:
- pkg install cmake
- pkg install git
build_script:
- ls /tmp/cirrus-ci-build/
- mkdir build
- cd build
- cmake ..
- ls /tmp/cirrus-ci-build/
- ls /tmp/cirrus-ci-build/build/singleheader
- make VERBOSE=1
- make -j2
test_script:
- ctest --extra-verbose
- cd build
- ctest -j2 --output-on-failure -E checkperf

View File

@ -2,6 +2,7 @@
[![CircleCI](https://circleci.com/gh/simdjson/simdjson.svg?style=svg)](https://circleci.com/gh/simdjson/simdjson)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/simdjson.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&q=proj%3Asimdjson&can=2)
[![Build status](https://ci.appveyor.com/api/projects/status/ae77wp5v3lebmu6n/branch/master?svg=true)](https://ci.appveyor.com/project/lemire/simdjson-jmmti/branch/master)
[![CirrusCI](https://api.cirrus-ci.com/github/simdjson/simdjson.svg)](https://cirrus-ci.com/github/simdjson/simdjson)
[![][license img]][license]
simdjson : Parsing gigabytes of JSON per second

View File

@ -20,7 +20,7 @@ Requirements
------------------
- A recent compiler (LLVM clang6 or better, GNU GCC 7 or better, Visual Studio 2017 or better). We require C++11 support as a minimum.
- A 64-bit system (ARM or x64 Intel/AMD). Under Visual Studio, you must compile for 64-bit (e.g., x64) targets.
- A 64-bit system (ARM or x64 Intel/AMD). We run tests on macOS, freeBSD, Linux and Windows. We recommend that Visual Studio users target a 64-bit build (x64).
Including simdjson
------------------

View File

@ -1,7 +1,13 @@
#
# Amalgamation
#
# We should check whether bash is available here and avoid failures on systems where
# bash is unavailable.
if (NOT MSVC)
##
# Important! The script amalgamate.sh is not generally executable. It
# assumes that bash is at /bin/bash which may not be true.
###
set(SINGLEHEADER_FILES simdjson.h simdjson.cpp amalgamate_demo.cpp README.md)
add_custom_command(
OUTPUT ${SINGLEHEADER_FILES}
@ -9,12 +15,11 @@ if (NOT MSVC)
AMALGAMATE_SOURCE_PATH=${PROJECT_SOURCE_DIR}/src
AMALGAMATE_INPUT_PATH=${PROJECT_SOURCE_DIR}/include
AMALGAMATE_OUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/amalgamate.sh
DEPENDS simdjson-source amalgamate.sh
bash ${CMAKE_CURRENT_SOURCE_DIR}/amalgamate.sh
DEPENDS amalgamate.sh simdjson-source
)
add_custom_target(amalgamate DEPENDS ${SINGLEHEADER_FILES})
add_executable(amalgamate_demo amalgamate_demo.cpp)
target_link_libraries(amalgamate_demo simdjson-include-source)
add_test(amalgamate_demo amalgamate_demo ${EXAMPLE_JSON} ${EXAMPLE_NDJSON})

View File

@ -66,7 +66,7 @@ if (NOT MSVC) # Can't run .sh on windows
#
add_test(
NAME testjson2json
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testjson2json.sh
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/testjson2json.sh
WORKING_DIRECTORY $<TARGET_FILE_DIR:minify>
)
set_property(TEST testjson2json APPEND PROPERTY DEPENDS minify json2json)
@ -79,12 +79,13 @@ if (NOT MSVC) # Can't run .sh on windows
add_executable(allparserscheckfile allparserscheckfile.cpp)
target_link_libraries(allparserscheckfile competition-all)
add_test(issue150 ${CMAKE_CURRENT_SOURCE_DIR}/issue150.sh)
add_test(issue150 bash ${CMAKE_CURRENT_SOURCE_DIR}/issue150.sh)
set_property(TEST issue150 APPEND PROPERTY DEPENDS allparserscheckfile)
set_property(TEST issue150 APPEND PROPERTY LABELS per_implementation)
endif()
endif()
# This should really test whether bash is available.
if (NOT MSVC)
#
# json2json tool test: check that json2json can parse twitter.json