diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b87db6e..b9bfdac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,28 +14,22 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, macos, windows] + os: [ubuntu, macos] timeout-minutes: 45 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v1 - - run: cargo test - - run: cargo test --features arbitrary_precision - - run: cargo test --features sort_keys - - run: ./scripts/run_examples.sh + - run: ./scripts/test_all.sh test-stable-self: - name: Rust stable on self-hosted arm - runs-on: [self-hosted, arm] + name: Rust stable on self-hosted + runs-on: [self-hosted] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v1 - - run: cargo test - - run: cargo test --features arbitrary_precision - - run: cargo test --features sort_keys - - run: ./scripts/run_examples.sh + - run: ./scripts/test_all.sh test-nightly: name: Rust nightly ${{matrix.os}} @@ -43,30 +37,42 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, macos, windows] + os: [ubuntu, macos] timeout-minutes: 45 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v1 - - run: cargo test - - run: cargo test --features arbitrary_precision - - run: cargo test --features sort_keys - - run: ./scripts/run_examples.sh + - run: ./scripts/test_all.sh test-nightlye-self: - name: Rust nightly on self-hosted arm - runs-on: [self-hosted, arm] + name: Rust nightly on self-hosted + runs-on: [self-hosted] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v1 - - run: cargo test - - run: cargo test --features arbitrary_precision - - run: cargo test --features sort_keys - - run: ./scripts/run_examples.sh + - run: ./scripts/test_all.sh clippy_lint: + name: Format check ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu, macos] + timeout-minutes: 45 + steps: + - uses: actions/checkout@v3 + - 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: runs-on: [self-hosted, X64] steps: - uses: actions/checkout@v3 @@ -76,12 +82,10 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Format check - run: | - cargo clippy --all-targets --all-features -- -D warnings - cargo fmt -- --check - - sanitize: + - name: Sanitize + run: ./scripts/sanitize.sh + + fuzz: runs-on: [self-hosted, X64] steps: - uses: actions/checkout@v3 @@ -91,16 +95,5 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Sanitize - run: ./scripts/sanitize.sh - - -# check-spelling: -# name: Check spelling -# runs-on: ubuntu-latest -# steps: -# - name: Check spelling -# uses: crate-ci/typos@master -# with: -# files: ./* -# config: ./_typos.toml \ No newline at end of file + - name: Fuzz + run: ./scripts/fuzz.sh diff --git a/scripts/fuzz.sh b/scripts/fuzz.sh index a5d5232..c8e79b0 100755 --- a/scripts/fuzz.sh +++ b/scripts/fuzz.sh @@ -4,4 +4,4 @@ set -ex cargo install cargo-fuzz -RUST_BACKTRACE=full cargo fuzz run fuzz_value -- -max_total_time=20m \ No newline at end of file +RUST_BACKTRACE=full cargo +nightly fuzz run fuzz_value -- -max_total_time=20m \ No newline at end of file diff --git a/scripts/run_examples.sh b/scripts/run_examples.sh deleted file mode 100755 index f63b124..0000000 --- a/scripts/run_examples.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -xe - -examples=$(cargo build --example 2>&1 | grep -v ":") - -for example in $examples; do - echo "Running example $example" - cargo run --example $example -done - diff --git a/scripts/test_all.sh b/scripts/test_all.sh index 2d07b73..d05282d 100755 --- a/scripts/test_all.sh +++ b/scripts/test_all.sh @@ -4,9 +4,19 @@ set -ex cargo test -./scripts/run_examples.sh +cargo test --features arbitrary_precision + +cargo test --features sort_keys + +cargo test --features use_raw + +examples=$(cargo build --example 2>&1 | grep -v ":") + +for example in $examples; do + echo "Running example $example" + cargo run --example $example +done -./scripts/fuzz.sh diff --git a/src/util/arch/mod.rs b/src/util/arch/mod.rs index c740702..4f378cb 100644 --- a/src/util/arch/mod.rs +++ b/src/util/arch/mod.rs @@ -3,7 +3,6 @@ cfg_if::cfg_if! { mod x86_64; pub use x86_64::*; } else if #[cfg(all(target_feature="neon", target_arch="aarch64"))] { - pub(crate) mod fallback; mod aarch64; pub use aarch64::*; } else {