From a287198fb865908e2b5e49db89da9fc0fe63c3d8 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:02:04 +0300 Subject: [PATCH 01/10] Add cargo audit --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ba8267..d881868 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,17 @@ jobs: - run: cargo clippy --all-targets --all-features + audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - run: | + cargo install cargo-audit + cargo audit --deny=warnings + coverage: runs-on: ubuntu-latest steps: From 0c4a0dcced8a9892ba71ad214c9e2a7357efbc47 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:02:35 +0300 Subject: [PATCH 02/10] Extend dev env --- .vscode/extensions.json | 4 ++++ .vscode/settings.json | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index de7e8a1..714f847 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,10 @@ { "recommendations": [ "rust-lang.rust-analyzer", + "vadimcn.vscode-lldb", + "tamasfe.even-better-toml", + "usernamehw.errorlens", + "fill-labs.dependi", "ryanluker.vscode-coverage-gutters", "cordx56.rustowl-vscode" ] diff --git a/.vscode/settings.json b/.vscode/settings.json index 470b798..cb73c01 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,11 @@ { "files.insertFinalNewline": true, "files.trimFinalNewlines": true, + "rust-analyzer.check.command": "clippy", + "[rust]": { + "editor.defaultFormatter": "rust-lang.rust-analyzer", + "editor.formatOnSave": true + }, "coverage-gutters.coverageBaseDir": "**", "[html]": { "editor.formatOnSave": false From 8c2c4ec84c721c14c4afa745253fbd25ee643fb8 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:06:37 +0300 Subject: [PATCH 03/10] Cache jobs --- .github/workflows/ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d881868..c9fce3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} - uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1 with: @@ -93,6 +93,14 @@ jobs: with: persist-credentials: false + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.toml') }} + - run: | cargo install cargo-audit cargo audit --deny=warnings @@ -110,7 +118,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.toml') }} - uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1 with: @@ -138,7 +146,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-cargo-examples-${{ hashFiles('**/Cargo.toml') }} - uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1 with: From 331d350304ae4c239549264757cd42210e4dd808 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:11:20 +0300 Subject: [PATCH 04/10] Run cargo audit on changes --- .github/workflows/cargo-audit.yml | 35 +++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 19 ----------------- 2 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/cargo-audit.yml diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml new file mode 100644 index 0000000..a66329d --- /dev/null +++ b/.github/workflows/cargo-audit.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: + - master + paths: + - '**/Cargo.toml' + pull_request: + paths: + - '**/Cargo.toml' + +permissions: + contents: read + actions: read + +jobs: + cargo-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.toml') }} + + - run: | + cargo install cargo-audit + cargo audit --deny=warnings diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9fce3c..78a3e25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,25 +86,6 @@ jobs: - run: cargo clippy --all-targets --all-features - audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.toml') }} - - - run: | - cargo install cargo-audit - cargo audit --deny=warnings - coverage: runs-on: ubuntu-latest steps: From 0aa5d78a39cf8040777db2fd70b6cdc89183d66c Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:14:24 +0300 Subject: [PATCH 05/10] Rename workflows --- .github/workflows/cargo-audit.yml | 4 ++-- .github/workflows/workflows-audit.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml index a66329d..e8bc966 100644 --- a/.github/workflows/cargo-audit.yml +++ b/.github/workflows/cargo-audit.yml @@ -1,4 +1,4 @@ -name: CI +name: Cargo Audit on: push: @@ -15,7 +15,7 @@ permissions: actions: read jobs: - cargo-audit: + audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workflows-audit.yml b/.github/workflows/workflows-audit.yml index 35bd1b2..2dda5c8 100644 --- a/.github/workflows/workflows-audit.yml +++ b/.github/workflows/workflows-audit.yml @@ -1,4 +1,4 @@ -name: CI +name: Workflows Audit on: push: @@ -15,7 +15,7 @@ permissions: actions: read jobs: - workflows-audit: + audit: runs-on: ubuntu-latest steps: From bd0c4f419359f68a604fe87ad37133d79437593a Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:14:53 +0300 Subject: [PATCH 06/10] Test change --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 4016880..ce48ef8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,4 +172,5 @@ trybuild = "1.0.105" [[bench]] name = "static_vector" + harness = false From d1c1447c6f9d6f95edde0c3fa74b3fb40118c5e8 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:25:57 +0300 Subject: [PATCH 07/10] Cache cargo build --- .github/workflows/cargo-audit.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml index e8bc966..b73ad21 100644 --- a/.github/workflows/cargo-audit.yml +++ b/.github/workflows/cargo-audit.yml @@ -25,9 +25,7 @@ jobs: - uses: actions/cache@v4 with: path: | - ~/.cargo/registry - ~/.cargo/git - target + ~/.cargo key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.toml') }} - run: | From 9e5bc5a6d4dab26455f9c9d2d8f11c0a61f289d9 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:26:13 +0300 Subject: [PATCH 08/10] Fix taiki-e/install-action commit hash --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78a3e25..762748c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,7 @@ jobs: with: toolchain: stable - - uses: taiki-e/install-action@13fe1882c51d253ef22193d24823029c0acab68b # cargo-llvm-cov + - uses: taiki-e/install-action@f676f6a897011f9ac8f578264b7142f4679496b9 # cargo-llvm-cov - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info From 890e2f2b9a97f1060032e09a30bffb8d1f5b95fb Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:31:21 +0300 Subject: [PATCH 09/10] Split run --- .github/workflows/cargo-audit.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml index b73ad21..13c1d84 100644 --- a/.github/workflows/cargo-audit.yml +++ b/.github/workflows/cargo-audit.yml @@ -28,6 +28,5 @@ jobs: ~/.cargo key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.toml') }} - - run: | - cargo install cargo-audit - cargo audit --deny=warnings + - run: cargo install cargo-audit + - run: cargo audit --deny=warnings From f820ab409ec61cf93b6a29320304e354379db56e Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 30 May 2025 18:32:51 +0300 Subject: [PATCH 10/10] Revert "Test change" This reverts commit bd0c4f419359f68a604fe87ad37133d79437593a. --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ce48ef8..4016880 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,5 +172,4 @@ trybuild = "1.0.105" [[bench]] name = "static_vector" - harness = false