Skip to content

feat(json): switch JSON backend to ujson with RapidJSON support #7

feat(json): switch JSON backend to ujson with RapidJSON support

feat(json): switch JSON backend to ujson with RapidJSON support #7

Workflow file for this run

name: Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
generate-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install modelscope transformers
- name: Generate Tests Data
run: |
cd tests
python generate_assets.py
- name: Upload models
uses: actions/upload-artifact@v4
with:
name: models
path: tests/models/
build-and-test:
needs: generate-data
runs-on: ubuntu-latest
strategy:
matrix:
ujson_use_rapidjson: ["OFF", "ON"]
name: build-test (RapidJSON=${{ matrix.ujson_use_rapidjson }})
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download models
uses: actions/download-artifact@v4
with:
name: models
path: tests/models/
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++
- name: Build
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DUJSON_USE_RAPIDJSON=${{ matrix.ujson_use_rapidjson }}
make -j$(nproc)
- name: Run Tests
run: |
cd build
./test_main