From b54bc78cda661d99962c138f4d89ae4050035f37 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Mon, 19 Jan 2026 11:55:36 +0100 Subject: [PATCH] Remove local cache-pixi-lock workflow This is now housed as an action in `Parcels-code/pixi-lock` to be moved into the official Pixi org down the line https://github.com/Parcels-code/pixi-lock/pull/2 --- .github/workflows/cache-pixi-lock.yml | 52 --------------------------- .github/workflows/ci.yml | 42 ++++++++++------------ 2 files changed, 19 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/cache-pixi-lock.yml diff --git a/.github/workflows/cache-pixi-lock.yml b/.github/workflows/cache-pixi-lock.yml deleted file mode 100644 index e938a7664..000000000 --- a/.github/workflows/cache-pixi-lock.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Generate and cache Pixi lockfile - -on: - workflow_call: - inputs: - pixi-version: - type: string - outputs: - cache-id: - description: "The lock file contents" - value: ${{ jobs.cache-pixi-lock.outputs.cache-id }} - -jobs: - cache-pixi-lock: - name: Pixi lock - runs-on: ubuntu-latest - outputs: - cache-id: ${{ steps.restore.outputs.cache-primary-key }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: recursive - - name: Get current date - id: date - run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" - - uses: actions/cache/restore@v5 - id: restore - with: - path: | - pixi.lock - key: ${{ steps.date.outputs.date }}_${{ inputs.pixi-version }}_${{hashFiles('pixi.toml')}} - - uses: prefix-dev/setup-pixi@v0.9.3 - if: ${{ !steps.restore.outputs.cache-hit }} - with: - pixi-version: ${{ inputs.pixi-version }} - run-install: false - - name: Run pixi lock - if: ${{ !steps.restore.outputs.cache-hit }} - run: pixi lock - - uses: actions/cache/save@v5 - if: ${{ !steps.restore.outputs.cache-hit }} - id: cache - with: - path: | - pixi.lock - key: ${{ steps.restore.outputs.cache-primary-key }} - - name: Upload pixi.lock - uses: actions/upload-artifact@v6 - with: - name: pixi-lock - path: pixi.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 270e99666..8823c7ca2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,9 +46,16 @@ jobs: echo "skip-ci=${SKIP_CI}" >> $GITHUB_OUTPUT cache-pixi-lock: - uses: ./.github/workflows/cache-pixi-lock.yml - with: - pixi-version: "v0.62.2" # keep in sync with env var above + runs-on: ubuntu-latest + outputs: + cache-key: ${{ steps.pixi-lock.outputs.cache-key }} + pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }} + steps: + - uses: actions/checkout@v4 + - uses: Parcels-code/pixi-lock/create-and-cache@2b823a4a804631370fbde7e6088ee5db71a26c60 # TODO: Update to action in prefix-dev once available + id: pixi-lock + with: + pixi-version: ${{env.PIXI_VERSION}} unit-test: name: "Unit tests: ${{ matrix.os }} | pixi run -e ${{ matrix.pixi-environment }} tests" runs-on: ${{ matrix.os }}-latest @@ -71,16 +78,12 @@ jobs: steps: - uses: actions/checkout@v5 - name: Restore cached pixi lockfile - uses: actions/cache/restore@v4 - id: restore-pixi-lock + uses: Parcels-code/pixi-lock/restore@2b823a4a804631370fbde7e6088ee5db71a26c60 # TODO: Update to action in prefix-dev once available with: - enableCrossOsArchive: true - path: | - pixi.lock - key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }} - uses: prefix-dev/setup-pixi@v0.9.0 with: - pixi-version: ${{ env.PIXI_VERSION }} + pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }} cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'v4-dev' }} # TODO: Update v4-dev to main when v4 is released # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache @@ -136,16 +139,12 @@ jobs: steps: - uses: actions/checkout@v5 - name: Restore cached pixi lockfile - uses: actions/cache/restore@v4 - id: restore-pixi-lock + uses: Parcels-code/pixi-lock/restore@2b823a4a804631370fbde7e6088ee5db71a26c60 # TODO: Update to action in prefix-dev once available with: - enableCrossOsArchive: true - path: | - pixi.lock - key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }} - uses: prefix-dev/setup-pixi@v0.9.0 with: - pixi-version: ${{ env.PIXI_VERSION }} + pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }} cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'v4-dev' }} # TODO: Update v4-dev to main when v4 is released - name: Integration test @@ -186,15 +185,12 @@ jobs: - name: Checkout uses: actions/checkout@v5 - name: Restore cached pixi lockfile - uses: actions/cache/restore@v4 - id: restore-pixi-lock + uses: Parcels-code/pixi-lock/restore@2b823a4a804631370fbde7e6088ee5db71a26c60 # TODO: Update to action in prefix-dev once available with: - path: | - pixi.lock - key: ${{ needs.cache-pixi-lock.outputs.cache-id }} + cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }} - uses: prefix-dev/setup-pixi@v0.9.0 with: - pixi-version: ${{ env.PIXI_VERSION }} + pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }} cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'v4-dev' }} # TODO: Update v4-dev to main when v4 is released - name: Typechecking