Skip to content

Commit 6d510f7

Browse files
Add Conda build Pixi task (#2529)
Enable the building of Conda packages for Parcels locally (to help with testing etc)
1 parent f997023 commit 6d510f7

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/ci/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Adapted from the conda forge recipe
55
context:
66
name: parcels
7-
version: ${{ env.get('PARCELS_ALPHA_VERSION') }}
7+
version: ${{ env.get('PARCELS_ALPHA_VERSION', default='0.1.0dev') }}
88

99
package:
1010
name: ${{ name|lower }}

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,10 @@ jobs:
212212
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
213213
cache: true
214214
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
215-
- run: pixi run get-parcels-alpha-version >> $GITHUB_ENV
216-
- run: echo "PARCELS_ALPHA_VERSION is $PARCELS_ALPHA_VERSION"
217-
- name: Build conda package
218-
uses: prefix-dev/[email protected]
219-
with:
220-
recipe-path: .github/ci/recipe.yaml
215+
- name: Find the alpha version of Parcels
216+
run: pixi run get-parcels-alpha-version >> $GITHUB_ENV
217+
- name: Build Parcels conda package
218+
run: pixi run build-parcels
221219
- if: github.ref == 'refs/heads/main'
222220
run: |
223221
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do

pixi.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ py-triangle = ">=20250106,<20250107"
3535
[dependencies]
3636
parcels = { path = "." }
3737

38-
[feature.alpha-parcels.dependencies]
38+
[feature.rattler-build.dependencies]
39+
python = "*"
3940
git = "*"
41+
rattler-build = "*"
4042

41-
[feature.alpha-parcels.tasks]
43+
[feature.rattler-build.tasks]
4244
get-parcels-alpha-version = { cmd = "python tools/get-parcels-alpha-version.py" }
45+
build-parcels = { cmd = "rattler-build build --recipe .github/ci/recipe.yaml", description = "Build the Parcels conda package" }
4346

4447
[feature.minimum.dependencies]
4548
python = "3.11.*"
@@ -133,4 +136,4 @@ test-py313 = { features = ["test", "py313"] }
133136
test-notebooks = { features = ["test", "notebooks"], solve-group = "main" }
134137
docs = { features = ["docs", "notebooks"], solve-group = "docs" }
135138
typing = { features = ["typing"], solve-group = "main" }
136-
alpha-parcels = { features = ["alpha-parcels"] }
139+
build = { features = ["rattler-build"] }

0 commit comments

Comments
 (0)