From 3cb036f5ba527afb3ca6f04c8b7e836bad7f2dc7 Mon Sep 17 00:00:00 2001 From: ToriChan Date: Fri, 5 Jul 2024 21:23:16 +0900 Subject: [PATCH] =?UTF-8?q?rust-cache=E3=81=AE=E5=B0=8E=E5=85=A5:=20?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=81=AE=E3=82=AD?= =?UTF-8?q?=E3=83=BC=E3=81=AB`main`=E3=82=92=E8=BF=BD=E5=8A=A0=20(#334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update: rust-cache: キャッシュのキーに`main`を追加 --- .github/workflows/code-check.yaml | 1 + .github/workflows/python-build-check.yaml | 4 ++++ .github/workflows/wasm-pack-test.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/code-check.yaml b/.github/workflows/code-check.yaml index 8c6da356..07d9b88b 100644 --- a/.github/workflows/code-check.yaml +++ b/.github/workflows/code-check.yaml @@ -19,6 +19,7 @@ jobs: with: cache-all-crates: true shared-key: 'test-on-pr' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - name: Set up clippy diff --git a/.github/workflows/python-build-check.yaml b/.github/workflows/python-build-check.yaml index 70afcfa6..530e1801 100644 --- a/.github/workflows/python-build-check.yaml +++ b/.github/workflows/python-build-check.yaml @@ -17,6 +17,7 @@ jobs: with: cache-all-crates: true shared-key: 'maturin-linux' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - uses: actions/setup-python@v5 @@ -38,6 +39,7 @@ jobs: with: cache-all-crates: true shared-key: 'maturin-windows' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - uses: actions/setup-python@v5 @@ -59,6 +61,7 @@ jobs: with: cache-all-crates: true shared-key: 'maturin-macos' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - uses: actions/setup-python@v5 @@ -79,6 +82,7 @@ jobs: with: cache-all-crates: true shared-key: 'maturin-sdist' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - name: Build sdist diff --git a/.github/workflows/wasm-pack-test.yaml b/.github/workflows/wasm-pack-test.yaml index 5f23761b..08c641f1 100644 --- a/.github/workflows/wasm-pack-test.yaml +++ b/.github/workflows/wasm-pack-test.yaml @@ -14,6 +14,7 @@ jobs: with: cache-all-crates: true shared-key: 'wasm-pack' + key: 'main' save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する cache-provider: 'github' - name: Install wasm-pack