diff --git a/.github/ci/recipe.yaml b/.github/ci/recipe.yaml index 0579c19e4..11a2d14b8 100644 --- a/.github/ci/recipe.yaml +++ b/.github/ci/recipe.yaml @@ -4,7 +4,7 @@ # Adapted from the conda forge recipe context: name: parcels - version: ${{ env.get('PARCELS_ALPHA_VERSION') }} + version: ${{ env.get('PARCELS_ALPHA_VERSION', default='0.1.0dev') }} package: name: ${{ name|lower }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad7b9e002..a706ae822 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -212,12 +212,10 @@ jobs: pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }} cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - - run: pixi run get-parcels-alpha-version >> $GITHUB_ENV - - run: echo "PARCELS_ALPHA_VERSION is $PARCELS_ALPHA_VERSION" - - name: Build conda package - uses: prefix-dev/rattler-build-action@v0.2.34 - with: - recipe-path: .github/ci/recipe.yaml + - name: Find the alpha version of Parcels + run: pixi run get-parcels-alpha-version >> $GITHUB_ENV + - name: Build Parcels conda package + run: pixi run build-parcels - if: github.ref == 'refs/heads/main' run: | for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do diff --git a/pixi.toml b/pixi.toml index 71ddfe96e..50983d639 100644 --- a/pixi.toml +++ b/pixi.toml @@ -35,11 +35,14 @@ py-triangle = ">=20250106,<20250107" [dependencies] parcels = { path = "." } -[feature.alpha-parcels.dependencies] +[feature.rattler-build.dependencies] +python = "*" git = "*" +rattler-build = "*" -[feature.alpha-parcels.tasks] +[feature.rattler-build.tasks] get-parcels-alpha-version = { cmd = "python tools/get-parcels-alpha-version.py" } +build-parcels = { cmd = "rattler-build build --recipe .github/ci/recipe.yaml", description = "Build the Parcels conda package" } [feature.minimum.dependencies] python = "3.11.*" @@ -133,4 +136,4 @@ test-py313 = { features = ["test", "py313"] } test-notebooks = { features = ["test", "notebooks"], solve-group = "main" } docs = { features = ["docs", "notebooks"], solve-group = "docs" } typing = { features = ["typing"], solve-group = "main" } -alpha-parcels = { features = ["alpha-parcels"] } +build = { features = ["rattler-build"] }