Skip to content

Commit 650dd62

Browse files
VeckoTheGeckodcheriankeewisshoyer
authored
Migrate development workflow to Pixi (#10888)
Co-authored-by: Deepak Cherian <[email protected]> Co-authored-by: Justus Magin <[email protected]> Co-authored-by: Stephan Hoyer <[email protected]>
1 parent 15f9b9b commit 650dd62

30 files changed

+721
-837
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
doc/whats-new.rst merge=union
33
# allow installing from git archives
44
.git_archival.txt export-subst
5+
# SCM syntax highlighting & preventing 3-way merges
6+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Generate and cache Pixi lockfile
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
pixi-version:
7+
type: string
8+
outputs:
9+
cache-id:
10+
description: "The lock file contents"
11+
value: ${{ jobs.cache-pixi-lock.outputs.cache-id }}
12+
13+
jobs:
14+
cache-pixi-lock:
15+
name: Pixi lock
16+
runs-on: ubuntu-latest
17+
outputs:
18+
cache-id: ${{ steps.restore.outputs.cache-primary-key }}
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
submodules: recursive
24+
- name: Get current date
25+
id: date
26+
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
27+
- uses: actions/cache/restore@v4
28+
id: restore
29+
with:
30+
path: |
31+
pixi.lock
32+
key: ${{ steps.date.outputs.date }}_${{ inputs.pixi-version }}_${{hashFiles('pixi.toml')}}
33+
- uses: prefix-dev/[email protected]
34+
if: ${{ !steps.restore.outputs.cache-hit }}
35+
with:
36+
pixi-version: ${{ inputs.pixi-version }}
37+
run-install: false
38+
- name: Run pixi lock
39+
if: ${{ !steps.restore.outputs.cache-hit }}
40+
run: pixi lock
41+
- uses: actions/cache/save@v4
42+
if: ${{ !steps.restore.outputs.cache-hit }}
43+
id: cache
44+
with:
45+
path: |
46+
pixi.lock
47+
key: ${{ steps.restore.outputs.cache-primary-key }}
48+
- name: Upload pixi.lock
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: pixi-lock
52+
path: pixi.lock

0 commit comments

Comments
 (0)