Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 22 additions & 61 deletions .github/workflows/conda-numpy-build.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,28 @@
name: build_publish_anaconda
name: OpenAlea CI

on:
push:
branches: [ master ]
branches:
- main
- master
tags:
- 'v*'
pull_request:
branches: [ master ]

types:
- opened
- synchronize
- reopened
release:
types:
- published

jobs:
build-and-publish:
name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ ubuntu-latest]
python-minor-version: [9]
isMaster:
- ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }}
exclude:
- isMaster: false
os: ubuntu-latest
python-minor-version: 7
- isMaster: false
os: ubuntu-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 7
- isMaster: false
os: macos-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 9
- isMaster: false
os: windows-latest
python-minor-version: 7
- isMaster: false
os: windows-latest
python-minor-version: 8
- isMaster: false
os: windows-latest
python-minor-version: 9
build:
uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}

steps:
- name: Chekout
uses: actions/checkout@v3
- name: Determine publish
uses: haya14busa/action-cond@v1
id: publish
with:
cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }}
if_true: 'true'
if_false: 'false'
- name: Build and Publish
uses: openalea/action-build-publish-anaconda@v0.1.4
with:
conda: numpy/conda
mamba: true
python: ${{ matrix.python-minor-version }}
numpy: '20'
channels: openalea3, conda-forge
token: ${{ secrets.ANACONDA_TOKEN }}
publish: ${{ steps.publish.outputs.value }}
label: main
with:
conda-directory: numpy/conda
python-minor-version: "[10, 11, 12]"
operating-system: '[ "ubuntu-latest" , "macos-13" , "windows-latest"]'
67 changes: 0 additions & 67 deletions .github/workflows/conda-pylab-build.yml

This file was deleted.

83 changes: 22 additions & 61 deletions .github/workflows/conda-stdlib-build.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,28 @@
name: build_publish_anaconda
name: OpenAlea CI

on:
push:
branches: [ master ]
branches:
- main
- master
tags:
- 'v*'
pull_request:
branches: [ master ]

types:
- opened
- synchronize
- reopened
release:
types:
- published

jobs:
build-and-publish:
name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ ubuntu-latest]
python-minor-version: [9]
isMaster:
- ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }}
exclude:
- isMaster: false
os: ubuntu-latest
python-minor-version: 7
- isMaster: false
os: ubuntu-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 7
- isMaster: false
os: macos-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 9
- isMaster: false
os: windows-latest
python-minor-version: 7
- isMaster: false
os: windows-latest
python-minor-version: 8
- isMaster: false
os: windows-latest
python-minor-version: 9
build:
uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}

steps:
- name: Chekout
uses: actions/checkout@v3
- name: Determine publish
uses: haya14busa/action-cond@v1
id: publish
with:
cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }}
if_true: 'true'
if_false: 'false'
- name: Build and Publish
uses: openalea/action-build-publish-anaconda@v0.1.4
with:
conda: stdlib/conda
mamba: true
python: ${{ matrix.python-minor-version }}
numpy: '20'
channels: openalea3, conda-forge
token: ${{ secrets.ANACONDA_TOKEN }}
publish: ${{ steps.publish.outputs.value }}
label: main
with:
conda-directory: stdlib/conda
python-minor-version: "[10, 11, 12]"
operating-system: '[ "ubuntu-latest" , "macos-13" , "windows-latest"]'
2 changes: 1 addition & 1 deletion image/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# tell setup not to create a zip file but install the egg as a directory (recomended to be set to False)
zip_safe=False,
# Dependencies
setup_requires=['openalea.deploy'],
#setup_requires=['openalea.deploy'],
#install_requires=[],
#dependency_links=['http://openalea.gforge.inria.fr/pi'],

Expand Down
61 changes: 37 additions & 24 deletions numpy/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,57 @@
{% set data = load_setup_py_data() %}
{% 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', {}).get('environment', {}).get('dependencies',[]) %}


package:
name: openalea.numpy
version: {{ data.get('version') }}
name: {{ name }}
version: {{ version }}

source:
path: ..

build:
noarch: python
string: py{{ PY_VER }}
preserve_egg_dir: True
number: 0
script: {{PYTHON}} setup.py install
# pip install options mainly ensure that dependencies are handled by conda (and not pip)
# --no-deps ensure pip will not install deps not declared in meta.yaml (but declared in pyproject.toml)
# --no-build-isolation ensure pip will not replace build deps declared in meta.yaml (and declared in pyproject.toml)
# --ignore-installed ensure that compiled files (accidentally present in sources or uncleaned locally) will be overwritten
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv

requirements:
build:
- python {{PY_VER}}
- setuptools
- openalea.deploy
host:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}

run:
- python <3.11
- openalea.core
- openalea.stdlib
- numpy
- python
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}

test:
imports:
- openalea.numpy_wralea
requires:
- pytest
- setuptools
imports:
- openalea.core
- openalea.numpy_wralea
source_files:
- test/
- test/*.py

- test/test_*.py
commands:
- cd test
- pytest -v test_*.py
- pytest -v

about:
home: {{ data.get('url') }}
license: Cecill-c License
summary: {{ data.get('description') }}

home: {{ home }}
license: {{ license }}
summary: {{ description }}
Loading
Loading