From 1604f8a937a86686c93e9f47764e5765b5a8abcb Mon Sep 17 00:00:00 2001 From: tsk Date: Fri, 24 Oct 2025 20:23:54 -0400 Subject: [PATCH] feat: update stable rust (#1207) --- .github/workflows/ci.yml | 104 +++++++++++++++++++++++---- .github/workflows/nutshell_itest.yml | 16 +++++ flake.lock | 36 +++++----- flake.nix | 4 +- rust-toolchain.toml | 2 +- 5 files changed, 129 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2ea5438..5ae04f89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,14 +19,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "nightly" + shared-key: "nightly-${{ steps.flake-hash.outputs.hash }}" - name: Cargo fmt run: | nix develop -i -L .#nightly --command bash -c ' @@ -56,14 +62,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Run example run: nix develop -i -L .#stable --command cargo r --example ${{ matrix.build-args }} @@ -150,14 +162,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Clippy run: nix develop -i -L .#stable --command cargo clippy ${{ matrix.build-args }} -- -D warnings - name: Test @@ -183,6 +201,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -197,10 +218,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Test run: nix develop -i -L .#stable --command just itest ${{ matrix.database }} @@ -223,6 +247,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -237,10 +264,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Clippy run: nix develop -i -L .#stable --command cargo clippy -- -D warnings - name: Test fake auth mint @@ -263,6 +293,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -277,10 +310,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Test fake mint run: nix develop -i -L .#stable --command just test-pure ${{ matrix.database }} - name: Install Postgres @@ -306,6 +342,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -320,10 +359,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Test run: nix develop -i -L .#stable --command just itest-payment-processor ${{matrix.ln}} @@ -358,14 +400,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "msrv" + shared-key: "msrv-${{ steps.flake-hash.outputs.hash }}" - name: Build run: nix develop -i -L .#msrv --command cargo build ${{ matrix.build-args }} @@ -391,14 +439,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Build cdk and binding run: nix develop -i -L ".#${{ matrix.rust }}" --command cargo build ${{ matrix.build-args }} --target ${{ matrix.target }} @@ -424,14 +478,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "msrv" + shared-key: "msrv-${{ steps.flake-hash.outputs.hash }}" - name: Build cdk wasm run: nix develop -i -L ".#${{ matrix.rust }}" --command cargo build ${{ matrix.build-args }} --target ${{ matrix.target }} @@ -450,6 +510,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -464,10 +527,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Start Keycloak with Backup run: | docker compose -f misc/keycloak/docker-compose-recover.yml up -d @@ -490,6 +556,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -504,10 +573,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Run doc tests run: nix develop -i -L .#stable --command cargo test --doc @@ -519,13 +591,19 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Install Nix uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: "stable" + shared-key: "stable-${{ steps.flake-hash.outputs.hash }}" - name: Check docs with strict warnings run: nix develop -i -L .#stable --command just docs-strict diff --git a/.github/workflows/nutshell_itest.yml b/.github/workflows/nutshell_itest.yml index bac6ae65..d967837c 100644 --- a/.github/workflows/nutshell_itest.yml +++ b/.github/workflows/nutshell_itest.yml @@ -10,6 +10,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -24,8 +27,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 + with: + shared-key: "integration-${{ steps.flake-hash.outputs.hash }}" - name: Test Nutshell run: nix develop -i -L .#integration --command just test-nutshell - name: Show logs if tests fail @@ -39,6 +47,9 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + - name: Get flake hash + id: flake-hash + run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -55,8 +66,13 @@ jobs: uses: DeterminateSystems/nix-installer-action@v17 - name: Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + with: + diagnostic-endpoint: "" + use-flakehub: false - name: Rust Cache uses: Swatinem/rust-cache@v2 + with: + shared-key: "integration-${{ steps.flake-hash.outputs.hash }}" - name: Test Nutshell Wallet run: | nix develop -i -L .#integration --command just nutshell-wallet-itest diff --git a/flake.lock b/flake.lock index 4926e618..186800f7 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1758758545, - "narHash": "sha256-NU5WaEdfwF6i8faJ2Yh+jcK9vVFrofLcwlD/mP65JrI=", + "lastModified": 1760924934, + "narHash": "sha256-tuuqY5aU7cUkR71sO2TraVKK2boYrdW3gCSXUkF4i44=", "owner": "ipetkov", "repo": "crane", - "rev": "95d528a5f54eaba0d12102249ce42f4d01f4e364", + "rev": "c6b4d5308293d0d04fcfeee92705017537cad02f", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "rust-analyzer-src": [] }, "locked": { - "lastModified": 1759387261, - "narHash": "sha256-u/gfYBMDnwD1mSAlzHnRVg3jst3ML0w9b3tYONXRsW8=", + "lastModified": 1761287960, + "narHash": "sha256-DbGYVbF0TgoKTFNQv/3jqaUWql8OYzewl4v2gw6jmQs=", "owner": "nix-community", "repo": "fenix", - "rev": "c61e7ab9cfa38119d5ab9e2d1156d23c19e9b8a0", + "rev": "64cb168ed9ec61ef18e28f1e4ee9f44381d6ecd2", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759281824, - "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=", + "lastModified": 1761173472, + "narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b5be50345d4113d04ba58c444348849f5585b4a", + "rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", "type": "github" }, "original": { @@ -109,11 +109,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1758029226, - "narHash": "sha256-TjqVmbpoCqWywY9xIZLTf6ANFvDCXdctCjoYuYPYdMI=", + "lastModified": 1759070547, + "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08b8f92ac6354983f5382124fef6006cade4a1c1", + "rev": "647e5c14cbd5067f44ac86b74f014962df460840", "type": "github" }, "original": { @@ -130,11 +130,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1760663237, + "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", "type": "github" }, "original": { @@ -160,11 +160,11 @@ ] }, "locked": { - "lastModified": 1759372351, - "narHash": "sha256-kULiC2oMMuyaO92gPiu+6XBfeXuFcXaauwo0tXAwXdQ=", + "lastModified": 1761273263, + "narHash": "sha256-6d6ojnu6A6sVxIjig8OL6E1T8Ge9st3YGgVwg5MOY+Q=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7ef14552303de7128662666f9a71342099ffc725", + "rev": "28405834d4fdd458d28e123fae4db148daecec6f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fbcc431a..46b1d327 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ # Toolchains # latest stable - stable_toolchain = pkgs.rust-bin.stable."1.86.0".default.override { + stable_toolchain = pkgs.rust-bin.stable."1.90.0".default.override { targets = [ "wasm32-unknown-unknown" ]; # wasm extensions = [ "rustfmt" @@ -172,6 +172,8 @@ msrv = pkgs.mkShell ( { shellHook = " + cargo update + cargo update home --precise 0.5.11 ${_shellHook} "; buildInputs = buildInputs ++ [ msrv_toolchain ]; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b557f5a4..e34c54e6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel="1.86.0" +channel="1.90.0" components = ["rustfmt", "clippy", "rust-analyzer"]