From 766959ad47892a21105b5f1560da65d7de31c75d Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Thu, 2 Jul 2026 08:51:20 -0500 Subject: [PATCH 1/5] ci: add caching for rust jobs --- .github/workflows/ci.yml | 13 ++++++++++--- .github/workflows/publish-binaries.yml | 6 +++--- rust-toolchain.toml | 3 +++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1171e85..1ccfb60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,17 @@ jobs: - os: macos-latest docker_tests_flags: "--no-default-features" steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v7 + + # selecting a toolchain either by action or manual `rustup` happen + # before cache setup + - run: rustup toolchain install stable --profile minimal + + - name: Set up rust cache + uses: Swatinem/rust-cache@v2 with: - targets: "wasm32-wasip1" + save-if: ${{ github.ref == 'refs/heads/main' }} + - name: Run lints if: matrix.run_lints diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index b519f24..927bc20 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -48,7 +48,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} @@ -104,7 +104,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} @@ -129,7 +129,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable - name: Publish wasm-pkg-common diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..9cab269 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "stable" + From bb069de1e478f1854428191594a23b097366feab Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Thu, 2 Jul 2026 09:31:35 -0500 Subject: [PATCH 2/5] fix: add p1 toolchain target --- rust-toolchain.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9cab269..d4678a9 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,5 @@ [toolchain] channel = "stable" +targets = ["wasm32-wasip1"] + From b9825c6cde88b4010294cc16bc1c74a3147307bd Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Thu, 2 Jul 2026 09:32:58 -0500 Subject: [PATCH 3/5] test caching --- .github/workflows/ci.yml | 4 ++-- rust-toolchain.toml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ccfb60..07406dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,8 +31,8 @@ jobs: - name: Set up rust cache uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} + # with: + # save-if: ${{ github.ref == 'refs/heads/main' }} - name: Run lints diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d4678a9..88a12d5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,3 @@ [toolchain] channel = "stable" targets = ["wasm32-wasip1"] - - From 31ec6cd640ffeb3721d6b221b86e015fd38e5fa5 Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Thu, 2 Jul 2026 13:10:09 -0500 Subject: [PATCH 4/5] revert(ci): add back safe-if on main flag --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07406dc..1ccfb60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,8 +31,8 @@ jobs: - name: Set up rust cache uses: Swatinem/rust-cache@v2 - # with: - # save-if: ${{ github.ref == 'refs/heads/main' }} + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Run lints From 7223202c9ebd5d6f2ba8f827b3769f3da900dccb Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Thu, 2 Jul 2026 13:16:48 -0500 Subject: [PATCH 5/5] fix(ci): bin action hashes --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-binaries.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ccfb60..23b2ba5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,14 +23,14 @@ jobs: - os: macos-latest docker_tests_flags: "--no-default-features" steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 # selecting a toolchain either by action or manual `rustup` happen # before cache setup - run: rustup toolchain install stable --profile minimal - name: Set up rust cache - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: save-if: ${{ github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index 927bc20..ae8a93f 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -48,7 +48,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} @@ -104,7 +104,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} @@ -129,7 +129,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install Rust run: rustup update stable --no-self-update && rustup default stable - name: Publish wasm-pkg-common