From 54bdab3c0b55c20abf2187d6ae00c0a6d7d95149 Mon Sep 17 00:00:00 2001 From: baugetfa Date: Thu, 10 Jul 2025 10:00:42 +0200 Subject: [PATCH 1/2] updated CI to new labels mgmt --- conda/meta.yaml | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 817fd40..e454be7 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,8 +1,16 @@ {% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %} +{% set name = pyproject.get('project').get('name') %} +{% set description = pyproject.get('project').get('description') %} +{% set version = environ.get('SETUPTOOLS_SCM_PRETEND_VERSION', "0.0.0.dev") %} +{% set license = pyproject.get('project').get('license') %} +{% set home = pyproject.get('project', {}).get('urls', {}).get('Homepage', '') %} +{% set build_deps = pyproject.get("build-system", {}).get("requires", []) %} +{% set deps = pyproject.get('project', {}).get('dependencies', []) %} +{% set conda_deps = pyproject.get('tool', {}).get('conda-environment', {}).get('dependencies',[]) %} package: - name: {{ pyproject["project"]["name"] }} - version: {{ GIT_DESCRIBE_TAG | replace("v", "") }} + name: {{ name }} + version: {{ version }} source: path: .. @@ -10,24 +18,28 @@ source: build: noarch: python number: 0 - script: {{PYTHON}} -m pip install . -vv + preserve_egg_dir: True + string: py{{ PY_VER }} + script: + - {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv requirements: + host: + - python + {% for dep in build_deps %} + - {{ dep }} + {% endfor %} + build: - - python {{ pyproject["project"]["requires-python"] }} - {% for dep in pyproject["build-system"]["requires"] %} - - {{ dep.lower() }} - {% endfor %} + - {{ compiler("cxx") }} run: - - python {{ pyproject["project"]["requires-python"] }} - {% for dep in pyproject["project"]["dependencies"] %} - - {{ dep.lower() }} - {% endfor %} - {% for dep in pyproject["tool"]["conda"]["environment"]["dependencies"] %} - - {{ dep.lower() }} + - python + {% for dep in deps + conda_deps %} + - {{ dep }} {% endfor %} + test: requires: - pytest @@ -41,6 +53,6 @@ test: - pytest -v test_*.py about: - summary: {{ pyproject["project"]["description"] }} - license: {{ pyproject["project"]["license"] }} - home: {{ pyproject["project"]["urls"]["Homepage"] }} + home: {{ home }} + summary: {{ description }} + license: {{ license }} From 6bcbdaee606cfea041a19565b8f5aab714fb867a Mon Sep 17 00:00:00 2001 From: baugetfa Date: Thu, 10 Jul 2025 10:03:15 +0200 Subject: [PATCH 2/2] new CI forgot GH action --- .github/workflows/conda-package-build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml index e75f2ac..6714743 100644 --- a/.github/workflows/conda-package-build.yml +++ b/.github/workflows/conda-package-build.yml @@ -1,24 +1,24 @@ -name: build_publish_anaconda +name: OpenAlea CI on: push: branches: - - '**' + - main + - master tags: - 'v*' pull_request: - branches: - - '**' - + types: + - opened + - synchronize + - reopened + release: + types: + - published jobs: build: - uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@label - with: - operating-system: '["ubuntu-latest"]' - build-options: "" - label: latest - python-minor-version: '[10]' + uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main secrets: anaconda_token: ${{ secrets.ANACONDA_TOKEN }}