Skip to content

decoder: Check trailing content when validating JSON #454

decoder: Check trailing content when validating JSON

decoder: Check trailing content when validating JSON #454

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
Alpine:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Build extension"
run: "docker build -t simdjsontest -f docker_php${{ matrix.php-version }}-alpine ."
- name: "Show"
run: "docker run --rm --env SIMDJSON_HIGH_MEMORY_TESTS=1 simdjsontest php --ri simdjson"
Ubuntu-dev:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Build PHP and extension in development mode"
run: "docker build -t simdjsontest -f docker_php8.4-dev ."
Ubuntu:
strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
os: [ubuntu-latest]
experimental: [false]
runs-on: ${{ matrix.os }}
name: PHP ${{ matrix.php-version }} Test on ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
extensions: json
# for correct php-config extension dir, see https://github.com/shivammathur/setup-php/issues/147
tools: pecl, phpize, php-config
- name: "Build extension"
run: |
export NO_INTERACTION=true
export REPORT_EXIT_STATUS=1
export SIMDJSON_HIGH_MEMORY_TESTS=1
php-config --extension-dir
phpize
./configure
make -j$(nproc)
sudo make install
make test TESTS="--show-diff -j2" || exit 1
- name: "Show"
run: "php -dextension=simdjson.so --ri simdjson"
- name: "Error log"
if: ${{ failure() }}
run: "ls -1t tests/*.log | xargs -d'\n' cat"
- name: "Error diff"
if: ${{ failure() }}
run: |
for FILE in $(find tests -name '*.diff'); do
echo $FILE
cat $FILE
echo
done
Macos:
runs-on: macos-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json
coverage: none
tools: none
- name: Build simdjson
run: |
phpize
./configure
make -j$(nproc)
- name: Run tests
run: |
export SIMDJSON_HIGH_MEMORY_TESTS=1
make test TESTS="--show-diff -j2"