Skip to content

opt: escape cold path + SIMD find_key_end + write_string_fast inline #750

opt: escape cold path + SIMD find_key_end + write_string_fast inline

opt: escape cold path + SIMD find_key_end + write_string_fast inline #750

Workflow file for this run

name: 'CI'
on: pull_request
permissions:
contents: read
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
test-stable-windows:
name: Rust stable (Windows)
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run tests
shell: bash
run: bash ./scripts/test.sh
test-stable-hosted:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
name: Rust stable (${{ matrix.os }})
runs-on: ${{matrix.os}}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: ./scripts/test.sh
test-stable-wasm:
runs-on: ubuntu-latest
env:
WASMTIME_BACKTRACE_DETAILS: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
- name: Install wasmtime
run: cargo install wasmtime-cli
- name: Run tests
run: |
cargo build --tests --target-dir target --target wasm32-wasip1
for wasm_file in target/wasm32-wasip1/debug/deps/sonic_rs-*.wasm; do
echo "Running $wasm_file"
wasmtime run "$wasm_file"
done
test-nightly-hosted:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
name: Rust nightly (${{ matrix.os }})
runs-on: ${{matrix.os}}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: ./scripts/test.sh
miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Run Miri
run: cargo miri test --all-features --lib
clippy_lint:
name: Format check
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Format check
run: |
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt -- --check
sanitize:
strategy:
fail-fast: false
matrix:
san: ["address,leak"]
feature: ["", "arbitrary_precision", "sort_keys", "utf8_lossy", "non_trailing_zero"]
name: Sanitize ${{matrix.san}} feature ${{matrix.feature}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Clippy
run: |
if [ -n "${{ matrix.feature }}" ]; then
cargo clippy --all-targets --features "${{ matrix.feature }}" -- -D warnings
else
cargo clippy --all-targets -- -D warnings
fi
- name: Sanitize
run: ./scripts/sanitize.sh ${{matrix.san}} ${{matrix.feature}}
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Fuzz
run: ./scripts/fuzz.sh