Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ordered float to tests #400

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- main


jobs:
clippy_check:
strategy:
Expand All @@ -26,42 +25,47 @@ jobs:
- name: Validate cargo format
run: cargo fmt -- --check

- name: Run tests
- name: Run tests
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy

- name: Run tests (no-default-features)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy

- name: Run tests (value-no-dup-keys)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features value-no-dup-keys

- name: Run tests (known-key)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features known-key

- name: Run tests (128bit)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features 128bit

- name: Run tests (beef)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features beef

- name: Run tests (arraybackend)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features arraybackend

- name: Run tests (approx-number-parsing)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features approx-number-parsing

- name: Run tests (ordered-float)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo clippy --features ordered-float
257 changes: 131 additions & 126 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,136 +15,141 @@ jobs:
- windows-latest
- macOS-latest
rustflags:
- ''
- '-C target-feature=-avx2'
- '-C target-feature=-avx2,-pclmulqdq'
- ""
- "-C target-feature=-avx2"
- "-C target-feature=-avx2,-pclmulqdq"

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run tests (alloc)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo test --features alloc

- name: llvm-cov - Clean
run: cargo llvm-cov clean --workspace

- name: Run tests
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report

- name: Run tests (no-default-features)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report

- name: Run tests (value-no-dup-keys)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features value-no-dup-keys

- name: Run tests (known-key)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features known-key

- name: Run tests (128bit)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features 128bit

- name: Run tests (beef)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features beef

- name: Run tests (arraybackend)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features arraybackend

- name: Run tests (approx-number-parsing)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features approx-number-parsing

- name: llvm-cov - Report
run: cargo llvm-cov report --lcov --output-path lcov.txt

- name: Generate matrix name
if: matrix.os == 'ubuntu-latest'
run: |
flags="${{ matrix.rustflags }}"
flags="${flags/-C target-feature=/}"
flags="${flags//[- ]/}"
echo "$flags"
echo "flags=$flags" >> $GITHUB_ENV

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: Wandalen/wretry.action@master
with:
action: codecov/codecov-action@v3
attempt_limit: 6
attempt_delay: 10000
with: |
files: ./lcov.txt
flags: unittests
verbose: true
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run tests (alloc)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo test --features alloc

- name: llvm-cov - Clean
run: cargo llvm-cov clean --workspace

- name: Run tests
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report

- name: Run tests (no-default-features)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report

- name: Run tests (value-no-dup-keys)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features value-no-dup-keys

- name: Run tests (known-key)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features known-key

- name: Run tests (128bit)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features 128bit

- name: Run tests (beef)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features beef

- name: Run tests (arraybackend)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features arraybackend

- name: Run tests (approx-number-parsing)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features approx-number-parsing

- name: Run tests (ordered-float)
env:
RUSTFLAGS: "-C target-cpu=native ${{ matrix.rustflags }}"
run: cargo llvm-cov --no-report --features ordered-float

- name: llvm-cov - Report
run: cargo llvm-cov report --lcov --output-path lcov.txt

- name: Generate matrix name
if: matrix.os == 'ubuntu-latest'
run: |
flags="${{ matrix.rustflags }}"
flags="${flags/-C target-feature=/}"
flags="${flags//[- ]/}"
echo "$flags"
echo "flags=$flags" >> $GITHUB_ENV

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: Wandalen/wretry.action@master
with:
action: codecov/codecov-action@v3
attempt_limit: 6
attempt_delay: 10000
with: |
files: ./lcov.txt
flags: unittests
verbose: true

test-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasi

- name: Install wasmtime
run: cargo install wasmtime-cli

- name: Run tests
run: |
cargo build --tests --target-dir target --target wasm32-wasi
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (no-default-features)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --no-default-features
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (no-inline)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features no-inline
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (value-no-dup-keys)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features value-no-dup-keys
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (128bit)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features 128bit
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (beef)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features beef
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (approx-number-parsing)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features approx-number-parsing
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasi

- name: Install wasmtime
run: cargo install wasmtime-cli

- name: Run tests
run: |
cargo build --tests --target-dir target --target wasm32-wasi
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (no-default-features)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --no-default-features
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (no-inline)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features no-inline
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (value-no-dup-keys)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features value-no-dup-keys
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (128bit)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features 128bit
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (beef)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features beef
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm

- name: Run tests (approx-number-parsing)
run: |
cargo build --tests --target-dir target --target wasm32-wasi --features approx-number-parsing
wasmtime run target/wasm32-wasi/debug/deps/simd_json*.wasm
Loading