From: Nicolas Patry Date: Tue, 8 Nov 2022 14:47:22 +0000 (+0100) Subject: Adding cargo audit check. (#64) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=77566b96c68a100e8beccc92443bb3e1cbd6bb7c;p=safetensors.git Adding cargo audit check. (#64) * Adding cargo audit check. * Update command line. * Update affected crates. --- diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b4d19a1..b2c2ba2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -50,6 +50,12 @@ jobs: command: clippy args: --manifest-path ./bindings/python/Cargo.toml --all-targets --all-features -- -D warnings + - name: Run Audit + uses: actions-rs/cargo@v1 + with: + command: audit + args: -D warnings -f ./bindings/python/Cargo.lock + - name: Install working-directory: ./bindings/python run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c394b8e..9a79a29 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -45,6 +45,12 @@ jobs: command: test args: --verbose --manifest-path ./safetensors/Cargo.toml + - name: Run Audit + uses: actions-rs/cargo@v1 + with: + command: audit + args: -D warnings -f ./safetensors/Cargo.lock + # Verify that Readme.md is up to date. - name: Make sure, Readme generated from lib.rs matches actual Readme if: matrix.os == 'ubuntu-latest' diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 79fdbed..d9e5e75 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] pyo3 = { version = "0.17.2", features = ["extension-module"] } -memmap = "0.7" +memmap2 = "0.5" serde_json = "1.0" libloading = "0.7" diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index df869e0..b5f40fb 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -1,7 +1,7 @@ #![deny(missing_docs)] //! Dummy doc use libloading::{Library, Symbol}; -use memmap::{Mmap, MmapOptions}; +use memmap2::{Mmap, MmapOptions}; use pyo3::exceptions; use pyo3::once_cell::GILOnceCell; use pyo3::prelude::*; diff --git a/safetensors/Cargo.toml b/safetensors/Cargo.toml index a3da6d9..e1ce008 100644 --- a/safetensors/Cargo.toml +++ b/safetensors/Cargo.toml @@ -10,7 +10,7 @@ serde = {version = "1.0", features = ["derive"]} serde_json = "1.0" [dev-dependencies] -criterion = "0.3" +criterion = "0.4" [[bench]] name = "benchmark"