From 632be3be0ad0cb9d1ed815a436ea33e252ced0ec Mon Sep 17 00:00:00 2001 From: Glatzel <893016099@qq.com> Date: Sat, 2 Nov 2024 22:57:31 +0800 Subject: [PATCH] ci: cache pixi packages on push to main --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05c88aa..8d4ceff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,20 @@ concurrency: cancel-in-progress: true jobs: + cache: + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + runs-on: windows-latest + strategy: + matrix: + pixi_env: [audio, arithmetic] + steps: + - uses: actions/checkout@v4 + - name: Set up pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + environments: ${{matrix.pixi_env}} + cache: true + ruff-lint: uses: Glatzel/template/.github/workflows/ruff.yml@main @@ -29,7 +43,6 @@ jobs: with: name: test machine: windows-latest - cache_write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} pixi_python_env: audio test_path: ./src/audio update_submodule: true @@ -42,7 +55,6 @@ jobs: with: name: test machine: windows-latest - cache_write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} pixi_python_env: arithmetic-cpu test_path: ./src/arithmetic update_submodule: true