Skip to content

Commit

Permalink
Add ordered float to tests
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser committed Oct 22, 2024
1 parent de7b6c3 commit da4774c
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 135 deletions.
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

0 comments on commit da4774c

Please sign in to comment.