From 23d9061b5eb1f29a3f71aafe07df8b02436424e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 22:51:18 +0000 Subject: [PATCH 1/3] Update criterion requirement from 0.4 to 0.5 Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.1) --- updated-dependencies: - dependency-name: criterion dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a5855ad..9f084cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ rand_chacha = "0.3" sha2 = "0.10" [dev-dependencies] -criterion = "0.4" +criterion = "0.5" proptest = "1" serde_json = "1" From 82b669ae3cff897626ae768a01325bf875dfb64a Mon Sep 17 00:00:00 2001 From: Craig Colegrove Date: Thu, 6 Feb 2025 10:44:59 -0800 Subject: [PATCH 2/3] Bump MSRV --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c063e96..024e746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.15.0 (Unreleased) + +- [[#194](https://github.com/IronCoreLabs/recrypt-rs/pull/194)] + - Change MSRV to Rust 1.74.0 + ## 0.14.1 (2024-12-05) - [[#190](https://github.com/IronCoreLabs/recrypt-rs/pull/190)] diff --git a/Cargo.toml b/Cargo.toml index 9f084cc..580a849 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ keywords = [ ] description = "A pure-Rust implementation of Transform Encryption, a Proxy Re-encryption scheme" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.74.0" [target.'cfg(all(unix, not(target_arch = "wasm32")))'.dependencies] libc = { version = "0.2" } From e0823019b1b04b1ae7e64d2ef599c2218d6dc2f6 Mon Sep 17 00:00:00 2001 From: Craig Colegrove Date: Thu, 6 Feb 2025 10:52:14 -0800 Subject: [PATCH 3/3] Also in CI --- .github/workflows/ci.yaml | 240 +++++++++++++++++++------------------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 628dcde..c7648c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - main + - main pull_request: name: CI @@ -12,20 +12,20 @@ jobs: name: Rustfmt runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - name: Cache cargo - uses: Swatinem/rust-cache@v1 - - uses: IronCoreLabs/rust-toolchain@v1 - with: - toolchain: nightly - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Cancel workflow - if: failure() - uses: andymckay/cancel-action@0.2 + - uses: actions/checkout@v4 + - name: Cache cargo + uses: Swatinem/rust-cache@v1 + - uses: IronCoreLabs/rust-toolchain@v1 + with: + toolchain: nightly + components: rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Cancel workflow + if: failure() + uses: andymckay/cancel-action@0.2 # Build on all the architectures we intend to support, including cross compiled ones. build: @@ -34,34 +34,34 @@ jobs: strategy: matrix: include: - - os: ubuntu-22.04 - target: aarch64-linux-android # Android x64 - - os: ubuntu-22.04 - target: x86_64-unknown-linux-musl # Alpine Linux x86_64 - - os: ubuntu-22.04 - target: wasm32-unknown-unknown - features: --features wasm --no-default-features - - os: macos-13 - target: aarch64-apple-ios - - os: macos-13 - target: x86_64-apple-darwin # 64-bit OSX - - os: macos-14 - target: aarch64-apple-darwin # 64-bit M1 OSX - - os: windows-2019 - target: x86_64-pc-windows-msvc + - os: ubuntu-22.04 + target: aarch64-linux-android # Android x64 + - os: ubuntu-22.04 + target: x86_64-unknown-linux-musl # Alpine Linux x86_64 + - os: ubuntu-22.04 + target: wasm32-unknown-unknown + features: --features wasm --no-default-features + - os: macos-13 + target: aarch64-apple-ios + - os: macos-13 + target: x86_64-apple-darwin # 64-bit OSX + - os: macos-14 + target: aarch64-apple-darwin # 64-bit M1 OSX + - os: windows-2019 + target: x86_64-pc-windows-msvc steps: - - uses: actions/checkout@v4 - - name: Cache cargo - uses: Swatinem/rust-cache@v1 - - uses: IronCoreLabs/rust-toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --release --target=${{ matrix.target }} ${{ matrix.features }} + - uses: actions/checkout@v4 + - name: Cache cargo + uses: Swatinem/rust-cache@v1 + - uses: IronCoreLabs/rust-toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --release --target=${{ matrix.target }} ${{ matrix.features }} # Run the tests on only one architecture, against various Rust versions. test: @@ -70,20 +70,20 @@ jobs: strategy: matrix: rust: - - stable - - beta - - 1.70.0 #MSRV + - stable + - beta + - 1.74.0 #MSRV fail-fast: false steps: - - uses: actions/checkout@v4 - - name: Cache cargo - uses: Swatinem/rust-cache@v1 - - uses: IronCoreLabs/rust-toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - - uses: actions-rs/cargo@v1 - with: - command: test + - uses: actions/checkout@v4 + - name: Cache cargo + uses: Swatinem/rust-cache@v1 + - uses: IronCoreLabs/rust-toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + - uses: actions-rs/cargo@v1 + with: + command: test # Benchmark current and base revisions, if this is a PR. bench: @@ -93,80 +93,80 @@ jobs: strategy: matrix: include: - - name: current - ref: ${{ github.ref }} - - name: base - ref: ${{ github.base_ref }} + - name: current + ref: ${{ github.ref }} + - name: base + ref: ${{ github.base_ref }} steps: - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.ref }} - - name: Cache cargo - uses: Swatinem/rust-cache@v1 - - uses: IronCoreLabs/rust-toolchain@v1 - with: - toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: install - args: critcmp - - uses: actions-rs/cargo@v1 - with: - command: bench - args: -- --save-baseline ${{ matrix.name }} - - run: critcmp --export ${{ matrix.name }} > results.json - - name: Store benchmark results - uses: actions/upload-artifact@v4 - with: - name: bench-${{ matrix.name }} - path: results.json + - uses: actions/checkout@v4 + with: + ref: ${{ matrix.ref }} + - name: Cache cargo + uses: Swatinem/rust-cache@v1 + - uses: IronCoreLabs/rust-toolchain@v1 + with: + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: install + args: critcmp + - uses: actions-rs/cargo@v1 + with: + command: bench + args: -- --save-baseline ${{ matrix.name }} + - run: critcmp --export ${{ matrix.name }} > results.json + - name: Store benchmark results + uses: actions/upload-artifact@v4 + with: + name: bench-${{ matrix.name }} + path: results.json # Add a comment to the PR with benchmark results. Only if everything else passed, and this is a PR. bench_results: needs: - - bench + - bench name: Upload benchmark results runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - name: Cache cargo - uses: Swatinem/rust-cache@v1 - - name: Retrieve benchmark results - uses: actions/download-artifact@v4 - with: - name: bench-current - - name: Delete artifact - uses: geekyeggo/delete-artifact@v1 - with: - name: bench-current - failOnError: false - - name: Retrieve benchmark results - uses: actions/download-artifact@v4 - with: - name: bench-base - - name: Delete artifact - uses: geekyeggo/delete-artifact@v1 - with: - name: bench-base - failOnError: false - - uses: IronCoreLabs/rust-toolchain@v1 - with: - toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: install - args: critcmp - - name: Compare benchmarks - run: | - if ! critcmp bench-base/results.json bench-current/results.json -t 10 ; then - echo "# Benchmark blew big budget! Bad!" > comment.md - fi - echo "Benchmark results comparing with base:" >> comment.md - echo '```' >> comment.md - critcmp bench-base/results.json bench-current/results.json -t 2 >> comment.md || true - echo '```' >> comment.md - cat comment.md - mv comment.md .github/workflows/comment.md + - uses: actions/checkout@v4 + - name: Cache cargo + uses: Swatinem/rust-cache@v1 + - name: Retrieve benchmark results + uses: actions/download-artifact@v4 + with: + name: bench-current + - name: Delete artifact + uses: geekyeggo/delete-artifact@v1 + with: + name: bench-current + failOnError: false + - name: Retrieve benchmark results + uses: actions/download-artifact@v4 + with: + name: bench-base + - name: Delete artifact + uses: geekyeggo/delete-artifact@v1 + with: + name: bench-base + failOnError: false + - uses: IronCoreLabs/rust-toolchain@v1 + with: + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: install + args: critcmp + - name: Compare benchmarks + run: | + if ! critcmp bench-base/results.json bench-current/results.json -t 10 ; then + echo "# Benchmark blew big budget! Bad!" > comment.md + fi + echo "Benchmark results comparing with base:" >> comment.md + echo '```' >> comment.md + critcmp bench-base/results.json bench-current/results.json -t 2 >> comment.md || true + echo '```' >> comment.md + cat comment.md + mv comment.md .github/workflows/comment.md # This will post a comment to the PR with benchmark results, but it's disabled because it's annoying. # - uses: harupy/comment-on-pr@c0522c4 # env: