From eb6bdc9d83db64e86947c04a8876db533d3c3aa6 Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Tue, 10 May 2016 08:38:27 +0100 Subject: [PATCH 1/2] Added ability to define a custom matrix. --- conda_smithy/ci_register.py | 2 +- conda_smithy/configure_feedstock.py | 163 +++++++++++++++--- conda_smithy/github.py | 2 +- conda_smithy/templates/README.md.tmpl | 3 +- conda_smithy/templates/appveyor.yml.tmpl | 14 +- .../templates/run_docker_build_matrix.tmpl | 11 +- conda_smithy/templates/travis.yml.tmpl | 8 +- conda_smithy/tests/integration/__init__.py | 0 .../integration/rendered_recipes/.gitignore | 2 + .../integration/rendered_recipes/__init__.py | 0 .../custom_matrix/.travis.yml | 38 ++++ .../custom_matrix/appveyor.yml | 78 +++++++++ .../ci_support/run_docker_build.sh | 49 ++++++ .../custom_matrix/conda-forge.yml | 10 ++ .../custom_matrix/recipe/meta.yaml | 31 ++++ .../rendered_recipes/np_dep/.travis.yml | 46 +++++ .../rendered_recipes/np_dep/appveyor.yml | 111 ++++++++++++ .../np_dep/ci_support/run_docker_build.sh | 88 ++++++++++ .../rendered_recipes/np_dep/recipe/meta.yaml | 57 ++++++ .../integration/rendered_recipes/test.py | 24 +++ 20 files changed, 689 insertions(+), 48 deletions(-) create mode 100644 conda_smithy/tests/integration/__init__.py create mode 100644 conda_smithy/tests/integration/rendered_recipes/.gitignore create mode 100644 conda_smithy/tests/integration/rendered_recipes/__init__.py create mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml create mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml create mode 100755 conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh create mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml create mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml create mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml create mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml create mode 100755 conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh create mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml create mode 100644 conda_smithy/tests/integration/rendered_recipes/test.py diff --git a/conda_smithy/ci_register.py b/conda_smithy/ci_register.py index 12bcff9de..0040ba7b7 100755 --- a/conda_smithy/ci_register.py +++ b/conda_smithy/ci_register.py @@ -53,7 +53,7 @@ def add_project_to_circle(user, project): # It is a strange response code, but is doing what was asked... if response.status_code != 400: response.raise_for_status() - print(' * {}/{} enabled on CircleCI') + print(' * {}/{} enabled on CircleCI'.format(user, project)) def add_project_to_appveyor(user, project): diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index 2c838bb26..5d39c9fc9 100755 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -23,12 +23,14 @@ def render_run_docker_build(jinja_env, forge_config, forge_dir): with fudge_subdir('linux-64'): meta = forge_config['package'] meta.parse_again() - matrix = compute_build_matrix(meta) + matrix = compute_build_matrix(meta, forge_config.get('matrix')) cases_not_skipped = [] for case in matrix: - if not ResolvedDistribution(meta, case).skip(): - cases_not_skipped.append(case) - matrix = cases_not_skipped + pkgs, vars = split_case(case) + with enable_vars(vars): + if not ResolvedDistribution(meta, pkgs).skip(): + cases_not_skipped.append(vars + sorted(pkgs)) + matrix = sorted(cases_not_skipped) target_fname = os.path.join(forge_dir, 'ci_support', 'run_docker_build.sh') if not matrix: @@ -37,8 +39,8 @@ def render_run_docker_build(jinja_env, forge_config, forge_dir): # be skipped anyway). matrix = [()] - forge_config = forge_config.copy() - forge_config['matrix'] = matrix + matrix = prepare_matrix_for_env_vars(matrix) + forge_config = update_matrix(forge_config, matrix) # TODO: Conda has a convenience for accessing nested yaml content. template_name = forge_config.get('templates', {}).get('run_docker_build', @@ -62,13 +64,15 @@ def render_travis(jinja_env, forge_config, forge_dir): with fudge_subdir('osx-64'): meta = forge_config['package'] meta.parse_again() - matrix = compute_build_matrix(meta) + matrix = compute_build_matrix(meta, forge_config.get('matrix')) cases_not_skipped = [] for case in matrix: - if not ResolvedDistribution(meta, case).skip(): - cases_not_skipped.append(case) - matrix = cases_not_skipped + pkgs, vars = split_case(case) + with enable_vars(vars): + if not ResolvedDistribution(meta, pkgs).skip(): + cases_not_skipped.append(vars + sorted(pkgs)) + matrix = sorted(cases_not_skipped) target_fname = os.path.join(forge_dir, '.travis.yml') @@ -78,8 +82,8 @@ def render_travis(jinja_env, forge_config, forge_dir): # be skipped anyway). matrix = [()] - forge_config = forge_config.copy() - forge_config['matrix'] = matrix + matrix = prepare_matrix_for_env_vars(matrix) + forge_config = update_matrix(forge_config, matrix) template = jinja_env.get_template('travis.yml.tmpl') with open(target_fname, 'w') as fh: @@ -93,17 +97,84 @@ def render_README(jinja_env, forge_config, forge_dir): fh.write(template.render(**forge_config)) -def render_appveyor(jinja_env, forge_config, forge_dir): - with fudge_subdir('win-64'): - meta = forge_config['package'] - meta.parse_again() - matrix = compute_build_matrix(meta) +class MatrixCaseEnvVar(object): + def __init__(self, name, value): + self.name = name + self.value = value - cases_not_skipped = [] - for case in matrix: - if not ResolvedDistribution(meta, case).skip(): - cases_not_skipped.append(case) - matrix = cases_not_skipped + def __iter__(self): + # We make the Var iterable so that loops like + # ``for name, value in cases`` can be used. + return iter([self.name, self.value]) + + def __cmp__(self, other): + # Implement ordering so that sorting functions as expected. + if not isinstance(other, type(self)): + return -3 + elif other.name != self.name: + return -2 + else: + return cmp(self.value, other.value) + + +@contextmanager +def enable_vars(vars): + existing = {} + for var in vars: + if var.name in os.environ: + existing[var.name] = os.environ[var.name] + os.environ[var.name] = str(var.value) + yield + for var in vars: + if var.name in existing: + os.environ[var.name] = existing[var.name] + else: + os.environ.pop(var.name) + + +def split_case(case): + vars = [item for item in case + if isinstance(item, MatrixCaseEnvVar)] + pkgs = [item for item in case + if not isinstance(item, MatrixCaseEnvVar)] + return pkgs, vars + + +def render_appveyor(jinja_env, forge_config, forge_dir): + full_matrix = [] + for platform, arch in [['win-32', 'x86'], ['win-64', 'x64']]: + with fudge_subdir(platform): + meta = forge_config['package'] + meta.parse_again() + matrix = compute_build_matrix(meta, forge_config.get('matrix')) + + cases_not_skipped = [] + for case in matrix: + pkgs, vars = split_case(case) + with enable_vars(vars): + if not ResolvedDistribution(meta, pkgs).skip(): + cases_not_skipped.append(vars + sorted(pkgs)) + if cases_not_skipped: + arch_env = MatrixCaseEnvVar('TARGET_ARCH', arch) + full_matrix.extend([arch_env] + list(case) + for case in cases_not_skipped) + + matrix = full_matrix + + def sort_without_target_arch(case): + arch = None + python = None + cmp_case = [] + for name, val in case: + if name == 'TARGET_ARCH': + arch_order = {'x86': 1, 'x64': 2}.get(val, 0) + elif name == 'python': + # We group all pythons together. + python = val + else: + cmp_case.append([name, val]) + return [python, cmp_case, arch_order] + matrix = sorted(matrix, key=sort_without_target_arch) target_fname = os.path.join(forge_dir, 'appveyor.yml') target_fname_disabled = os.path.join(forge_dir, 'disabled_appveyor.yml') @@ -119,14 +190,50 @@ def render_appveyor(jinja_env, forge_config, forge_dir): if os.path.exists(target_fname_disabled): os.remove(target_fname_disabled) - forge_config = forge_config.copy() - forge_config['matrix'] = matrix - + matrix = prepare_matrix_for_env_vars(matrix) + forge_config = update_matrix(forge_config, matrix) template = jinja_env.get_template('appveyor.yml.tmpl') with open(target_fname, 'w') as fh: fh.write(template.render(**forge_config)) +def update_matrix(forge_config, new_matrix): + """ + Return a new config with the build matrix updated. + + """ + forge_config = forge_config.copy() + forge_config['matrix'] = new_matrix + return forge_config + + +def prepare_matrix_for_env_vars(matrix): + """ + Turns a matrix with environment variables and pakages into a matrix of + just environment variables. The package variables are prefixed with CONDA, + and special cases such as Python and Numpy are handled. + + """ + special_conda_vars = {'python': 'CONDA_PY', 'numpy': 'CONDA_NPY'} + env_matrix = [] + for case in matrix: + new_case = [] + for item in case: + if isinstance(item, MatrixCaseEnvVar): + new_case.append((item.name, item.value)) + else: + # We have a package, so transform it into something conda understands. + name, value = item + if name in special_conda_vars: + name = special_conda_vars[name] + value = str(value).replace('.', '') + else: + name = 'CONDA_' + name.upper() + new_case.append((name, value)) + env_matrix.append(new_case) + return env_matrix + + def copytree(src, dst, ignore=(), root_dst=None): if root_dst is None: root_dst = dst @@ -158,10 +265,14 @@ def meta_of_feedstock(forge_dir): return meta -def compute_build_matrix(meta): +def compute_build_matrix(meta, existing_matrix=None): index = conda.api.get_index() mtx = special_case_version_matrix(meta, index) mtx = list(filter_cases(mtx, ['python >=2.7,<3|>=3.4', 'numpy >=1.10'])) + if existing_matrix: + mtx = [tuple(mtx_case) + tuple(MatrixCaseEnvVar(*item) for item in case) + for case in sorted(existing_matrix) + for mtx_case in mtx] return mtx diff --git a/conda_smithy/github.py b/conda_smithy/github.py index 986b86711..1dec14a25 100644 --- a/conda_smithy/github.py +++ b/conda_smithy/github.py @@ -34,7 +34,7 @@ def create_github_repo(args): # Use the organization provided. user_or_org = gh.get_organization(args.organization) - repo_name = os.path.basename(os.path.abspath(args.feedstock_directory)) + repo_name = meta.name() try: gh_repo = user_or_org.create_repo(repo_name, has_wiki=False, description='A conda-smithy repository for {}.'.format(meta.name())) diff --git a/conda_smithy/templates/README.md.tmpl b/conda_smithy/templates/README.md.tmpl index b5d7e1cfe..093aa9e18 100644 --- a/conda_smithy/templates/README.md.tmpl +++ b/conda_smithy/templates/README.md.tmpl @@ -69,9 +69,10 @@ Terminology Current build status ==================== +{% set appveyor_name = package.name().replace('_', '-').replace('.', '-') %} Linux: [![Circle CI](https://circleci.com/gh/conda-forge/{{package.name()}}-feedstock.svg?style=svg)](https://circleci.com/gh/conda-forge/{{package.name()}}-feedstock) OSX: [![TravisCI](https://travis-ci.org/conda-forge/{{package.name()}}-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/{{package.name()}}-feedstock) -Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/{{package.name()}}-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/{{package.name()}}-feedstock/branch/master) +Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/{{appveyor_name}}-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/{{appveyor_name}}-feedstock/branch/master) Current release info ==================== diff --git a/conda_smithy/templates/appveyor.yml.tmpl b/conda_smithy/templates/appveyor.yml.tmpl index 34ed927f8..7a96371de 100644 --- a/conda_smithy/templates/appveyor.yml.tmpl +++ b/conda_smithy/templates/appveyor.yml.tmpl @@ -1,9 +1,3 @@ -{%- set conda_vars = {'python': 'CONDA_PY', 'numpy': 'CONDA_NPY'} -%} -{% macro matrix_env(arch, matrix_item) -%} - - TARGET_ARCH: {{ arch }}{% for dep_name, version in matrix_item | sort %} - {%- if dep_name in conda_vars %}{% set version = version|replace('.', '') %}{% endif %} - {{ conda_vars.get(dep_name, 'CONDA_' + dep_name|upper) }}: {{ version }}{% endfor %} -{%- endmacro %} # This file was automatically generated by conda-smithy. To update a component of this # file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run # "conda-smithy regenerate". @@ -27,9 +21,11 @@ environment: secure: {{ hashed_secure }} {%- endfor %} - matrix:{% for case in matrix | sort %} - {{ matrix_env("x86", case) }} - {{ matrix_env("x64", case) }} + matrix: + {%- for case in matrix %} + {%- for dep_name, version in case %} + {% if loop.first %}- {% else %} {% endif %}{{ dep_name }}: {{version }} + {%- endfor %} {% endfor %} # We always use a 64-bit machine, but can build x86 distributions diff --git a/conda_smithy/templates/run_docker_build_matrix.tmpl b/conda_smithy/templates/run_docker_build_matrix.tmpl index 74d0b7a71..d14ec6196 100644 --- a/conda_smithy/templates/run_docker_build_matrix.tmpl +++ b/conda_smithy/templates/run_docker_build_matrix.tmpl @@ -1,14 +1,13 @@ {%- extends "run_docker_build.tmpl" -%} -{%- set conda_vars = {'python': 'CONDA_PY', 'numpy': 'CONDA_NPY'} -%} {% macro matrix_env(matrix_item) -%} - {% for dep_name, version in matrix_item | sort %} - {%- if dep_name in conda_vars %}{% set version = version|replace('.', '') %}{% endif %} - export {{ conda_vars.get(dep_name, 'CONDA_' + dep_name|upper) }}={{ version }}{% endfor %} + {%- for dep_name, version in matrix_item %} + export {{ dep_name }}={{version }} + {%- endfor %} {%- endmacro -%} {%- block build -%} # Embarking on {{ matrix|length }} case(s). -{%- for case in matrix | sort %} +{%- for case in matrix %} {%- if case %} set -x {{- matrix_env(case) }} @@ -16,7 +15,7 @@ {%- endif -%} {{- super()|indent(4) }} {% endfor %}{% endblock -%} -{%- block test_and_upload -%}{% for case in matrix | sort -%} +{%- block test_and_upload -%}{% for case in matrix -%} {{ matrix_env(case) }} {{- super()|indent(4) }} {%- endfor -%}{% endblock -%} diff --git a/conda_smithy/templates/travis.yml.tmpl b/conda_smithy/templates/travis.yml.tmpl index 4ca74ce80..9741a2ca7 100644 --- a/conda_smithy/templates/travis.yml.tmpl +++ b/conda_smithy/templates/travis.yml.tmpl @@ -1,7 +1,7 @@ -{%- set conda_vars = {'python': 'CONDA_PY', 'numpy': 'CONDA_NPY'} -%} {%- macro matrix_env(matrix_item) -%} - {% for dep_name, version in matrix_item | sort %}{%- if dep_name in conda_vars %}{% set version = version|replace('.', '') %}{% endif -%} - {{ conda_vars.get(dep_name, 'CONDA_' + dep_name|upper) }}={{ version }}{% if not loop.last %} {% endif %}{% endfor %} + {% for dep_name, version in matrix_item -%} + {{ dep_name }}={{ version }}{% if not loop.last %} {% endif %} + {%- endfor %} {%- endmacro -%} # This file was generated automatically from conda-smithy. To update this configuration, # update the conda-forge.yaml and/or the recipe/meta.yaml. @@ -13,7 +13,7 @@ language: objective-c env: {%- if matrix[0] %} matrix: - {% for case in matrix | sort %} + {% for case in matrix %} - {{ matrix_env(case) }} {%- endfor %} {%- endif %} diff --git a/conda_smithy/tests/integration/__init__.py b/conda_smithy/tests/integration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/conda_smithy/tests/integration/rendered_recipes/.gitignore b/conda_smithy/tests/integration/rendered_recipes/.gitignore new file mode 100644 index 000000000..f57ab8f89 --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/.gitignore @@ -0,0 +1,2 @@ +custom_matrix/* +np_dep/* diff --git a/conda_smithy/tests/integration/rendered_recipes/__init__.py b/conda_smithy/tests/integration/rendered_recipes/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml new file mode 100644 index 000000000..307ffa75a --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml @@ -0,0 +1,38 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yaml and/or the recipe/meta.yaml. + +language: objective-c + +env: + global: + # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. + - secure: "YqQx/MQxy9/xejDEqHdeyBMAPX0zDYd5CsyC2+z9xWo9aFvNGt+cnQBfDPdoPJzjIJUsmDPvSjvjbTg8Lb4OWA4mxDFbsY+Ko6jsloCjr8BhWyIHh2CpE+BTHFPdPrVZshXcmd4mPfiWemdnUS/dYGee0EWVztPwnA1mNjbhzetnxk9YFdw8FQdPVNMiMi9s9Cwk0153VAD8H4gnXNXUC9Q86xSSHU0SnSmdeF7B5HRSwqlyn31Am/2ZwZS5lHaG+ks7AHbjIiSUhIWbLPXIKhe3r0RRMx7OfjmUHBMFQV8hzpH0T9/7pAs6pO//a4xtjsedXK8t34BSY80gfQbrFmb6GMK/+Unk8ih/P6D0epvh6dytTtrMjPrcVZCMF5Eq14PeR/oHpZpqynVP2woxu+r5+QxQUVi3MeeEa3GRgVoI/t+pLpSm9lEc5BqWJ0jq3FZNDA12CUyO27wv1mwhgwuHOGaU4WAbzUIuiGI2/YMcxLQzijU5SG1bOLr+Aqv/8fKuvzhK4QZKuUCx9v8tRA/oWFDpxYjQG4MsP14tLF0YyQ+eFTh7fddaZXB5/C+Rk3/0EGJuwkFhF+Il7KwDy8t6V6hBoT6w/63PMxA4T2el0YwuqomC3ObgB2kxkAo4+pbxoFNzyIdXqdeEs1uXqIF3sEkyvbmdeCsxdq6+ROw=" + + +before_install: + # Remove homebrew. + - brew remove --force $(brew list) + - brew cleanup -s + - rm -rf $(brew --cache) + +install: + - | + MINICONDA_URL="http://repo.continuum.io/miniconda" + MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" + curl -O "${MINICONDA_URL}/${MINICONDA_FILE}" + bash $MINICONDA_FILE -b + + export PATH=/Users/travis/miniconda3/bin:$PATH + + conda config --set show_channel_urls true + conda update --yes conda + conda install --yes conda-build=1.20.0 jinja2 anaconda-client + conda config --add channels conda-forge + + +script: + - conda build ./recipe + +after_success: + + - ./ci_support/upload_or_check_non_existence.py ./recipe conda-forge --channel=main diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml new file mode 100644 index 000000000..8e93f0f2c --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml @@ -0,0 +1,78 @@ +# This file was automatically generated by conda-smithy. To update a component of this +# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run +# "conda-smithy regenerate". + +environment: + + CONDA_INSTALL_LOCN: "C:\\conda" + + # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the + # /E:ON and /V:ON options are not enabled in the batch script intepreter + # See: http://stackoverflow.com/a/13751649/163740 + CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd" + + # We set a default Python version for the miniconda that is to be installed. This can be + # overridden in the matrix definition where appropriate. + CONDA_PY: "27" + BINSTAR_TOKEN: + # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. + secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC + + matrix: + - TARGET_ARCH: x86 + VC_VERSION: 9 + + - TARGET_ARCH: x64 + VC_VERSION: 9 + + - TARGET_ARCH: x86 + VC_VERSION: 10 + + - TARGET_ARCH: x86 + VC_VERSION: 14 + + - TARGET_ARCH: x64 + VC_VERSION: 14 + + +# We always use a 64-bit machine, but can build x86 distributions +# with the TARGET_ARCH variable. +platform: + - x64 + +install: + # If there is a newer build queued for the same PR, cancel this one. + # The AppVeyor 'rollout builds' option is supposed to serve the same + # purpose but it is problematic because it tends to cancel builds pushed + # directly to master instead of just PR builds (or the converse). + # credits: JuliaLang developers. + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } + + # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + - cmd: rmdir C:\cygwin /s /q + - appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py" + - cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci + - cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH% + - cmd: set PYTHONUNBUFFERED=1 + + - cmd: conda config --set show_channel_urls true + - cmd: conda install -c http://conda.binstar.org/pelson/channel/development --yes --quiet obvious-ci + - cmd: conda config --add channels http://conda.binstar.org/conda-forge + - cmd: conda info + - cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools + # Workaround for Python 3.4 and x64 bug in latest conda-build. + # FIXME: Remove once there is a release that fixes the upstream issue + # ( https://github.com/conda/conda-build/issues/895 ). + - cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes + +# Skip .NET project specific build phase. +build: off + +test_script: + - "%CMD_IN_ENV% conda build recipe --quiet" +deploy_script: + + - 'python ci_support\upload_or_check_non_existence.py .\recipe conda-forge --channel=main' diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh new file mode 100755 index 000000000..45dcc43ae --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe + +docker info + +config=$(cat < ~/.condarc +# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts. +conda clean --lock + +conda update --yes --all +conda install --yes conda-build==1.18.2 +conda info + +# Embarking on 1 case(s). + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 +EOF diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml new file mode 100644 index 000000000..cf322ddfb --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml @@ -0,0 +1,10 @@ +matrix: + - [[VC_VERSION, 9]] + - [[VC_VERSION, 10]] + - [[VC_VERSION, 14]] +travis: + secure: + BINSTAR_TOKEN: YqQx/MQxy9/xejDEqHdeyBMAPX0zDYd5CsyC2+z9xWo9aFvNGt+cnQBfDPdoPJzjIJUsmDPvSjvjbTg8Lb4OWA4mxDFbsY+Ko6jsloCjr8BhWyIHh2CpE+BTHFPdPrVZshXcmd4mPfiWemdnUS/dYGee0EWVztPwnA1mNjbhzetnxk9YFdw8FQdPVNMiMi9s9Cwk0153VAD8H4gnXNXUC9Q86xSSHU0SnSmdeF7B5HRSwqlyn31Am/2ZwZS5lHaG+ks7AHbjIiSUhIWbLPXIKhe3r0RRMx7OfjmUHBMFQV8hzpH0T9/7pAs6pO//a4xtjsedXK8t34BSY80gfQbrFmb6GMK/+Unk8ih/P6D0epvh6dytTtrMjPrcVZCMF5Eq14PeR/oHpZpqynVP2woxu+r5+QxQUVi3MeeEa3GRgVoI/t+pLpSm9lEc5BqWJ0jq3FZNDA12CUyO27wv1mwhgwuHOGaU4WAbzUIuiGI2/YMcxLQzijU5SG1bOLr+Aqv/8fKuvzhK4QZKuUCx9v8tRA/oWFDpxYjQG4MsP14tLF0YyQ+eFTh7fddaZXB5/C+Rk3/0EGJuwkFhF+Il7KwDy8t6V6hBoT6w/63PMxA4T2el0YwuqomC3ObgB2kxkAo4+pbxoFNzyIdXqdeEs1uXqIF3sEkyvbmdeCsxdq6+ROw= +appveyor: + secure: + BINSTAR_TOKEN: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml new file mode 100644 index 000000000..1ed9c003b --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml @@ -0,0 +1,31 @@ +{% set VERSION = os.environ.get('VC_VERSION', '9')|string %} +{% set runtime_years = {'9': '2008', '10': '2010', '14': '2015'} %} +{% set runtime_year = runtime_years[VERSION] %} + +package: + name: vc + version: {{ VERSION }} + +build: + number: 0 + track_features: + - vc{{ VERSION }} + skip: true # [not win] + skip: true # [{{ VERSION }} == 10 and win64] + +requirements: + run: + - vs{{ runtime_year }}_runtime + +about: + home: https://github.com/conda/conda/wiki/VC-features + license: Modified BSD License (3-clause) + summary: A meta-package to track VC features. + +extra: + recipe-maintainers: + - jakirkham + - 183amir + - pelson + - patricksnape + - msarahan diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml b/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml new file mode 100644 index 000000000..5b57d061b --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml @@ -0,0 +1,46 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yaml and/or the recipe/meta.yaml. + +language: objective-c + +env: + matrix: + + - CONDA_PY=27 CONDA_NPY=110 + - CONDA_PY=27 CONDA_NPY=111 + - CONDA_PY=34 CONDA_NPY=110 + - CONDA_PY=34 CONDA_NPY=111 + - CONDA_PY=35 CONDA_NPY=110 + - CONDA_PY=35 CONDA_NPY=111 + global: + # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. + - secure: "lzrqDJmz3bwkIyjJT4mBpTo4uRH+XPb5tr4QrgCqTI0VvsKB6ip9l/DbUG/u3RtA23EJnZNEbftIVptmxhgRBL84jhZ9PVFjh/IKVkLN3nXxHvyVqzLZ2hWHL5TL1fExZLot3mu9cehGWfNmg6JXLWhENis/ckmvjDt7EI9YHpdEpaj/u6GgPE7qzlnzWYozyTD2TcXSjVpMH5rJ5h8aorU8smEoX3acTI0p9BxcvXqQp2HSfmR8NS4KTWb2TfnBsv5jxl913CNMHLORnOYXy0Xd/PC9MEcvtLbYy8BCx1cfg1VnzwXpy2RrCXJ0K6g3xuZuPCTGe8jPxHeOiYnCBATWj+ZFLeofvcYPmjUyxzrJr99SaOKZ4m8UWROZngqQZfGGBKvs/2jpu95/cDlx4EuInwqEQXOnSi3TwBPagZM95Z2F8XNVNAUs/RY57g6cUrFoTeMkE3wSNauqoPUzSfapp5kenPfwm8w9yieVzqWTgdIMrnwsDM2oGoH9AhYFStw+ypj4G2rJpU78QdRMy+xTEI15tOi0ki11FKnjgZVLsbLROq6c92qHSutG9b0u2pZDFPD0AqdhaqsCygxKdcHnuKcc8uyPIEiHl5Nj09GaGVaW37gK/cC9lGZp7PTjSyLWXBI9O8e/8F5BZb/DuKxjqeDFQ5ZJM1gZlac8ErY=" + + +before_install: + # Remove homebrew. + - brew remove --force $(brew list) + - brew cleanup -s + - rm -rf $(brew --cache) + +install: + - | + MINICONDA_URL="http://repo.continuum.io/miniconda" + MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" + curl -O "${MINICONDA_URL}/${MINICONDA_FILE}" + bash $MINICONDA_FILE -b + + export PATH=/Users/travis/miniconda3/bin:$PATH + + conda config --set show_channel_urls true + conda update --yes conda + conda install --yes conda-build=1.20.0 jinja2 anaconda-client + conda config --add channels conda-forge + + +script: + - conda build ./recipe + +after_success: + + - ./ci_support/upload_or_check_non_existence.py ./recipe conda-forge --channel=main diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml b/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml new file mode 100644 index 000000000..a29db5c32 --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml @@ -0,0 +1,111 @@ +# This file was automatically generated by conda-smithy. To update a component of this +# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run +# "conda-smithy regenerate". + +environment: + + CONDA_INSTALL_LOCN: "C:\\conda" + + # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the + # /E:ON and /V:ON options are not enabled in the batch script intepreter + # See: http://stackoverflow.com/a/13751649/163740 + CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd" + + # We set a default Python version for the miniconda that is to be installed. This can be + # overridden in the matrix definition where appropriate. + CONDA_PY: "27" + BINSTAR_TOKEN: + # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. + secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC + + matrix: + - TARGET_ARCH: x86 + CONDA_NPY: 110 + CONDA_PY: 27 + + - TARGET_ARCH: x64 + CONDA_NPY: 110 + CONDA_PY: 27 + + - TARGET_ARCH: x86 + CONDA_NPY: 111 + CONDA_PY: 27 + + - TARGET_ARCH: x64 + CONDA_NPY: 111 + CONDA_PY: 27 + + - TARGET_ARCH: x86 + CONDA_NPY: 110 + CONDA_PY: 34 + + - TARGET_ARCH: x64 + CONDA_NPY: 110 + CONDA_PY: 34 + + - TARGET_ARCH: x86 + CONDA_NPY: 111 + CONDA_PY: 34 + + - TARGET_ARCH: x64 + CONDA_NPY: 111 + CONDA_PY: 34 + + - TARGET_ARCH: x86 + CONDA_NPY: 110 + CONDA_PY: 35 + + - TARGET_ARCH: x64 + CONDA_NPY: 110 + CONDA_PY: 35 + + - TARGET_ARCH: x86 + CONDA_NPY: 111 + CONDA_PY: 35 + + - TARGET_ARCH: x64 + CONDA_NPY: 111 + CONDA_PY: 35 + + +# We always use a 64-bit machine, but can build x86 distributions +# with the TARGET_ARCH variable. +platform: + - x64 + +install: + # If there is a newer build queued for the same PR, cancel this one. + # The AppVeyor 'rollout builds' option is supposed to serve the same + # purpose but it is problematic because it tends to cancel builds pushed + # directly to master instead of just PR builds (or the converse). + # credits: JuliaLang developers. + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } + + # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + - cmd: rmdir C:\cygwin /s /q + - appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py" + - cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci + - cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH% + - cmd: set PYTHONUNBUFFERED=1 + + - cmd: conda config --set show_channel_urls true + - cmd: conda install -c http://conda.binstar.org/pelson/channel/development --yes --quiet obvious-ci + - cmd: conda config --add channels http://conda.binstar.org/conda-forge + - cmd: conda info + - cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools + # Workaround for Python 3.4 and x64 bug in latest conda-build. + # FIXME: Remove once there is a release that fixes the upstream issue + # ( https://github.com/conda/conda-build/issues/895 ). + - cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes + +# Skip .NET project specific build phase. +build: off + +test_script: + - "%CMD_IN_ENV% conda build recipe --quiet" +deploy_script: + + - 'python ci_support\upload_or_check_non_existence.py .\recipe conda-forge --channel=main' diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh b/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh new file mode 100755 index 000000000..b39f4cc57 --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe + +docker info + +config=$(cat < ~/.condarc +# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts. +conda clean --lock + +conda update --yes --all +conda install --yes conda-build +conda info + +# Embarking on 6 case(s). + set -x + export CONDA_PY=27 + export CONDA_NPY=110 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 + + set -x + export CONDA_PY=27 + export CONDA_NPY=111 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 + + set -x + export CONDA_PY=34 + export CONDA_NPY=110 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 + + set -x + export CONDA_PY=34 + export CONDA_NPY=111 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 + + set -x + export CONDA_PY=35 + export CONDA_NPY=110 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 + + set -x + export CONDA_PY=35 + export CONDA_NPY=111 + set +x + conda build /recipe_root --quiet || exit 1 + /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 +EOF diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml b/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml new file mode 100644 index 000000000..a242ff148 --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml @@ -0,0 +1,57 @@ +{% set version = "1.6.3" %} + +package: + name: fiona + version: {{ version }} + +source: + fn: Fiona-{{ version }}.post1.tar.gz + url: https://pypi.python.org/packages/source/F/Fiona/Fiona-{{ version }}.post1.tar.gz + md5: f68a470455f92cb45d56e4a549a2161c + +build: + number: 5 + preserve_egg_dir: True + entry_points: + - fio=fiona.fio.main:main_group + +requirements: + build: + - python + - cython + - setuptools + - numpy x.x + - gdal 1.11.4 + run: + - python + - setuptools + - numpy x.x + - gdal 1.11.4 + - cligj + - munch + - click-plugins + - six + +test: + imports: + - fiona + - fiona.fio + commands: + - fio --help + - conda inspect linkages fiona --name _test # [linux] + requires: + - nose + files: + - test.cpg + - test.dbf + - test.shp + - test.shx + +about: + home: http://github.com/Toblerity/Fiona + license: BSD License + summary: Fiona reads and writes spatial data files + +extra: + recipe-maintainers: + - ocefpaf diff --git a/conda_smithy/tests/integration/rendered_recipes/test.py b/conda_smithy/tests/integration/rendered_recipes/test.py new file mode 100644 index 000000000..6f05869b9 --- /dev/null +++ b/conda_smithy/tests/integration/rendered_recipes/test.py @@ -0,0 +1,24 @@ +import os +import subprocess +import unittest + + +class Test_custom_matrix(unittest.TestCase): + priors = {} +# for fname in ['appveyor.yml', 'ci_scripts/run_docker_build.sh', '.travis.yml']: + feedstock_dir = os.path.join(os.path.dirname(__file__), 'custom_matrix') + child = subprocess.Popen(['conda-smithy', 'rerender', '--feedstock_directory', feedstock_dir], + stdout=subprocess.PIPE) + out, _ = child.communicate() +# self.assertEqual(child.returncode, 0, out) + # TODO: Make some assertions. + +class Test_np_dep(unittest.TestCase): + feedstock_dir = os.path.join(os.path.dirname(__file__), 'np_dep') + child = subprocess.Popen(['conda-smithy', 'rerender', '--feedstock_directory', feedstock_dir], + stdout=subprocess.PIPE) + out, _ = child.communicate() + + +if __name__ == '__main__': + unittest.main() From 75365c724852558405d544b863e22168f15c32aa Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Thu, 12 May 2016 09:03:48 +0100 Subject: [PATCH 2/2] Removed the integration test. --- conda_smithy/tests/integration/__init__.py | 0 .../integration/rendered_recipes/.gitignore | 2 - .../integration/rendered_recipes/__init__.py | 0 .../custom_matrix/.travis.yml | 38 ------ .../custom_matrix/appveyor.yml | 78 ------------ .../ci_support/run_docker_build.sh | 49 -------- .../custom_matrix/conda-forge.yml | 10 -- .../custom_matrix/recipe/meta.yaml | 31 ----- .../rendered_recipes/np_dep/.travis.yml | 46 -------- .../rendered_recipes/np_dep/appveyor.yml | 111 ------------------ .../np_dep/ci_support/run_docker_build.sh | 88 -------------- .../rendered_recipes/np_dep/recipe/meta.yaml | 57 --------- .../integration/rendered_recipes/test.py | 24 ---- 13 files changed, 534 deletions(-) delete mode 100644 conda_smithy/tests/integration/__init__.py delete mode 100644 conda_smithy/tests/integration/rendered_recipes/.gitignore delete mode 100644 conda_smithy/tests/integration/rendered_recipes/__init__.py delete mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml delete mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml delete mode 100755 conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh delete mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml delete mode 100644 conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml delete mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml delete mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml delete mode 100755 conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh delete mode 100644 conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml delete mode 100644 conda_smithy/tests/integration/rendered_recipes/test.py diff --git a/conda_smithy/tests/integration/__init__.py b/conda_smithy/tests/integration/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/conda_smithy/tests/integration/rendered_recipes/.gitignore b/conda_smithy/tests/integration/rendered_recipes/.gitignore deleted file mode 100644 index f57ab8f89..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -custom_matrix/* -np_dep/* diff --git a/conda_smithy/tests/integration/rendered_recipes/__init__.py b/conda_smithy/tests/integration/rendered_recipes/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml deleted file mode 100644 index 307ffa75a..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yaml and/or the recipe/meta.yaml. - -language: objective-c - -env: - global: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - - secure: "YqQx/MQxy9/xejDEqHdeyBMAPX0zDYd5CsyC2+z9xWo9aFvNGt+cnQBfDPdoPJzjIJUsmDPvSjvjbTg8Lb4OWA4mxDFbsY+Ko6jsloCjr8BhWyIHh2CpE+BTHFPdPrVZshXcmd4mPfiWemdnUS/dYGee0EWVztPwnA1mNjbhzetnxk9YFdw8FQdPVNMiMi9s9Cwk0153VAD8H4gnXNXUC9Q86xSSHU0SnSmdeF7B5HRSwqlyn31Am/2ZwZS5lHaG+ks7AHbjIiSUhIWbLPXIKhe3r0RRMx7OfjmUHBMFQV8hzpH0T9/7pAs6pO//a4xtjsedXK8t34BSY80gfQbrFmb6GMK/+Unk8ih/P6D0epvh6dytTtrMjPrcVZCMF5Eq14PeR/oHpZpqynVP2woxu+r5+QxQUVi3MeeEa3GRgVoI/t+pLpSm9lEc5BqWJ0jq3FZNDA12CUyO27wv1mwhgwuHOGaU4WAbzUIuiGI2/YMcxLQzijU5SG1bOLr+Aqv/8fKuvzhK4QZKuUCx9v8tRA/oWFDpxYjQG4MsP14tLF0YyQ+eFTh7fddaZXB5/C+Rk3/0EGJuwkFhF+Il7KwDy8t6V6hBoT6w/63PMxA4T2el0YwuqomC3ObgB2kxkAo4+pbxoFNzyIdXqdeEs1uXqIF3sEkyvbmdeCsxdq6+ROw=" - - -before_install: - # Remove homebrew. - - brew remove --force $(brew list) - - brew cleanup -s - - rm -rf $(brew --cache) - -install: - - | - MINICONDA_URL="http://repo.continuum.io/miniconda" - MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" - curl -O "${MINICONDA_URL}/${MINICONDA_FILE}" - bash $MINICONDA_FILE -b - - export PATH=/Users/travis/miniconda3/bin:$PATH - - conda config --set show_channel_urls true - conda update --yes conda - conda install --yes conda-build=1.20.0 jinja2 anaconda-client - conda config --add channels conda-forge - - -script: - - conda build ./recipe - -after_success: - - - ./ci_support/upload_or_check_non_existence.py ./recipe conda-forge --channel=main diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml deleted file mode 100644 index 8e93f0f2c..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/appveyor.yml +++ /dev/null @@ -1,78 +0,0 @@ -# This file was automatically generated by conda-smithy. To update a component of this -# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run -# "conda-smithy regenerate". - -environment: - - CONDA_INSTALL_LOCN: "C:\\conda" - - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd" - - # We set a default Python version for the miniconda that is to be installed. This can be - # overridden in the matrix definition where appropriate. - CONDA_PY: "27" - BINSTAR_TOKEN: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC - - matrix: - - TARGET_ARCH: x86 - VC_VERSION: 9 - - - TARGET_ARCH: x64 - VC_VERSION: 9 - - - TARGET_ARCH: x86 - VC_VERSION: 10 - - - TARGET_ARCH: x86 - VC_VERSION: 14 - - - TARGET_ARCH: x64 - VC_VERSION: 14 - - -# We always use a 64-bit machine, but can build x86 distributions -# with the TARGET_ARCH variable. -platform: - - x64 - -install: - # If there is a newer build queued for the same PR, cancel this one. - # The AppVeyor 'rollout builds' option is supposed to serve the same - # purpose but it is problematic because it tends to cancel builds pushed - # directly to master instead of just PR builds (or the converse). - # credits: JuliaLang developers. - - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` - https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` - Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` - throw "There are newer queued builds for this pull request, failing early." } - - # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) - - cmd: rmdir C:\cygwin /s /q - - appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py" - - cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci - - cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH% - - cmd: set PYTHONUNBUFFERED=1 - - - cmd: conda config --set show_channel_urls true - - cmd: conda install -c http://conda.binstar.org/pelson/channel/development --yes --quiet obvious-ci - - cmd: conda config --add channels http://conda.binstar.org/conda-forge - - cmd: conda info - - cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools - # Workaround for Python 3.4 and x64 bug in latest conda-build. - # FIXME: Remove once there is a release that fixes the upstream issue - # ( https://github.com/conda/conda-build/issues/895 ). - - cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes - -# Skip .NET project specific build phase. -build: off - -test_script: - - "%CMD_IN_ENV% conda build recipe --quiet" -deploy_script: - - - 'python ci_support\upload_or_check_non_existence.py .\recipe conda-forge --channel=main' diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh deleted file mode 100755 index 45dcc43ae..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/ci_support/run_docker_build.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe - -docker info - -config=$(cat < ~/.condarc -# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts. -conda clean --lock - -conda update --yes --all -conda install --yes conda-build==1.18.2 -conda info - -# Embarking on 1 case(s). - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 -EOF diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml deleted file mode 100644 index cf322ddfb..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/conda-forge.yml +++ /dev/null @@ -1,10 +0,0 @@ -matrix: - - [[VC_VERSION, 9]] - - [[VC_VERSION, 10]] - - [[VC_VERSION, 14]] -travis: - secure: - BINSTAR_TOKEN: YqQx/MQxy9/xejDEqHdeyBMAPX0zDYd5CsyC2+z9xWo9aFvNGt+cnQBfDPdoPJzjIJUsmDPvSjvjbTg8Lb4OWA4mxDFbsY+Ko6jsloCjr8BhWyIHh2CpE+BTHFPdPrVZshXcmd4mPfiWemdnUS/dYGee0EWVztPwnA1mNjbhzetnxk9YFdw8FQdPVNMiMi9s9Cwk0153VAD8H4gnXNXUC9Q86xSSHU0SnSmdeF7B5HRSwqlyn31Am/2ZwZS5lHaG+ks7AHbjIiSUhIWbLPXIKhe3r0RRMx7OfjmUHBMFQV8hzpH0T9/7pAs6pO//a4xtjsedXK8t34BSY80gfQbrFmb6GMK/+Unk8ih/P6D0epvh6dytTtrMjPrcVZCMF5Eq14PeR/oHpZpqynVP2woxu+r5+QxQUVi3MeeEa3GRgVoI/t+pLpSm9lEc5BqWJ0jq3FZNDA12CUyO27wv1mwhgwuHOGaU4WAbzUIuiGI2/YMcxLQzijU5SG1bOLr+Aqv/8fKuvzhK4QZKuUCx9v8tRA/oWFDpxYjQG4MsP14tLF0YyQ+eFTh7fddaZXB5/C+Rk3/0EGJuwkFhF+Il7KwDy8t6V6hBoT6w/63PMxA4T2el0YwuqomC3ObgB2kxkAo4+pbxoFNzyIdXqdeEs1uXqIF3sEkyvbmdeCsxdq6+ROw= -appveyor: - secure: - BINSTAR_TOKEN: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC diff --git a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml b/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml deleted file mode 100644 index 1ed9c003b..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/custom_matrix/recipe/meta.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{% set VERSION = os.environ.get('VC_VERSION', '9')|string %} -{% set runtime_years = {'9': '2008', '10': '2010', '14': '2015'} %} -{% set runtime_year = runtime_years[VERSION] %} - -package: - name: vc - version: {{ VERSION }} - -build: - number: 0 - track_features: - - vc{{ VERSION }} - skip: true # [not win] - skip: true # [{{ VERSION }} == 10 and win64] - -requirements: - run: - - vs{{ runtime_year }}_runtime - -about: - home: https://github.com/conda/conda/wiki/VC-features - license: Modified BSD License (3-clause) - summary: A meta-package to track VC features. - -extra: - recipe-maintainers: - - jakirkham - - 183amir - - pelson - - patricksnape - - msarahan diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml b/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml deleted file mode 100644 index 5b57d061b..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/np_dep/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yaml and/or the recipe/meta.yaml. - -language: objective-c - -env: - matrix: - - - CONDA_PY=27 CONDA_NPY=110 - - CONDA_PY=27 CONDA_NPY=111 - - CONDA_PY=34 CONDA_NPY=110 - - CONDA_PY=34 CONDA_NPY=111 - - CONDA_PY=35 CONDA_NPY=110 - - CONDA_PY=35 CONDA_NPY=111 - global: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - - secure: "lzrqDJmz3bwkIyjJT4mBpTo4uRH+XPb5tr4QrgCqTI0VvsKB6ip9l/DbUG/u3RtA23EJnZNEbftIVptmxhgRBL84jhZ9PVFjh/IKVkLN3nXxHvyVqzLZ2hWHL5TL1fExZLot3mu9cehGWfNmg6JXLWhENis/ckmvjDt7EI9YHpdEpaj/u6GgPE7qzlnzWYozyTD2TcXSjVpMH5rJ5h8aorU8smEoX3acTI0p9BxcvXqQp2HSfmR8NS4KTWb2TfnBsv5jxl913CNMHLORnOYXy0Xd/PC9MEcvtLbYy8BCx1cfg1VnzwXpy2RrCXJ0K6g3xuZuPCTGe8jPxHeOiYnCBATWj+ZFLeofvcYPmjUyxzrJr99SaOKZ4m8UWROZngqQZfGGBKvs/2jpu95/cDlx4EuInwqEQXOnSi3TwBPagZM95Z2F8XNVNAUs/RY57g6cUrFoTeMkE3wSNauqoPUzSfapp5kenPfwm8w9yieVzqWTgdIMrnwsDM2oGoH9AhYFStw+ypj4G2rJpU78QdRMy+xTEI15tOi0ki11FKnjgZVLsbLROq6c92qHSutG9b0u2pZDFPD0AqdhaqsCygxKdcHnuKcc8uyPIEiHl5Nj09GaGVaW37gK/cC9lGZp7PTjSyLWXBI9O8e/8F5BZb/DuKxjqeDFQ5ZJM1gZlac8ErY=" - - -before_install: - # Remove homebrew. - - brew remove --force $(brew list) - - brew cleanup -s - - rm -rf $(brew --cache) - -install: - - | - MINICONDA_URL="http://repo.continuum.io/miniconda" - MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" - curl -O "${MINICONDA_URL}/${MINICONDA_FILE}" - bash $MINICONDA_FILE -b - - export PATH=/Users/travis/miniconda3/bin:$PATH - - conda config --set show_channel_urls true - conda update --yes conda - conda install --yes conda-build=1.20.0 jinja2 anaconda-client - conda config --add channels conda-forge - - -script: - - conda build ./recipe - -after_success: - - - ./ci_support/upload_or_check_non_existence.py ./recipe conda-forge --channel=main diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml b/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml deleted file mode 100644 index a29db5c32..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/np_dep/appveyor.yml +++ /dev/null @@ -1,111 +0,0 @@ -# This file was automatically generated by conda-smithy. To update a component of this -# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run -# "conda-smithy regenerate". - -environment: - - CONDA_INSTALL_LOCN: "C:\\conda" - - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd" - - # We set a default Python version for the miniconda that is to be installed. This can be - # overridden in the matrix definition where appropriate. - CONDA_PY: "27" - BINSTAR_TOKEN: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC - - matrix: - - TARGET_ARCH: x86 - CONDA_NPY: 110 - CONDA_PY: 27 - - - TARGET_ARCH: x64 - CONDA_NPY: 110 - CONDA_PY: 27 - - - TARGET_ARCH: x86 - CONDA_NPY: 111 - CONDA_PY: 27 - - - TARGET_ARCH: x64 - CONDA_NPY: 111 - CONDA_PY: 27 - - - TARGET_ARCH: x86 - CONDA_NPY: 110 - CONDA_PY: 34 - - - TARGET_ARCH: x64 - CONDA_NPY: 110 - CONDA_PY: 34 - - - TARGET_ARCH: x86 - CONDA_NPY: 111 - CONDA_PY: 34 - - - TARGET_ARCH: x64 - CONDA_NPY: 111 - CONDA_PY: 34 - - - TARGET_ARCH: x86 - CONDA_NPY: 110 - CONDA_PY: 35 - - - TARGET_ARCH: x64 - CONDA_NPY: 110 - CONDA_PY: 35 - - - TARGET_ARCH: x86 - CONDA_NPY: 111 - CONDA_PY: 35 - - - TARGET_ARCH: x64 - CONDA_NPY: 111 - CONDA_PY: 35 - - -# We always use a 64-bit machine, but can build x86 distributions -# with the TARGET_ARCH variable. -platform: - - x64 - -install: - # If there is a newer build queued for the same PR, cancel this one. - # The AppVeyor 'rollout builds' option is supposed to serve the same - # purpose but it is problematic because it tends to cancel builds pushed - # directly to master instead of just PR builds (or the converse). - # credits: JuliaLang developers. - - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` - https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` - Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` - throw "There are newer queued builds for this pull request, failing early." } - - # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) - - cmd: rmdir C:\cygwin /s /q - - appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py" - - cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci - - cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH% - - cmd: set PYTHONUNBUFFERED=1 - - - cmd: conda config --set show_channel_urls true - - cmd: conda install -c http://conda.binstar.org/pelson/channel/development --yes --quiet obvious-ci - - cmd: conda config --add channels http://conda.binstar.org/conda-forge - - cmd: conda info - - cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools - # Workaround for Python 3.4 and x64 bug in latest conda-build. - # FIXME: Remove once there is a release that fixes the upstream issue - # ( https://github.com/conda/conda-build/issues/895 ). - - cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes - -# Skip .NET project specific build phase. -build: off - -test_script: - - "%CMD_IN_ENV% conda build recipe --quiet" -deploy_script: - - - 'python ci_support\upload_or_check_non_existence.py .\recipe conda-forge --channel=main' diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh b/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh deleted file mode 100755 index b39f4cc57..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/np_dep/ci_support/run_docker_build.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe - -docker info - -config=$(cat < ~/.condarc -# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts. -conda clean --lock - -conda update --yes --all -conda install --yes conda-build -conda info - -# Embarking on 6 case(s). - set -x - export CONDA_PY=27 - export CONDA_NPY=110 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 - - set -x - export CONDA_PY=27 - export CONDA_NPY=111 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 - - set -x - export CONDA_PY=34 - export CONDA_NPY=110 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 - - set -x - export CONDA_PY=34 - export CONDA_NPY=111 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 - - set -x - export CONDA_PY=35 - export CONDA_NPY=110 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 - - set -x - export CONDA_PY=35 - export CONDA_NPY=111 - set +x - conda build /recipe_root --quiet || exit 1 - /feedstock_root/ci_support/upload_or_check_non_existence.py /recipe_root conda-forge --channel=main || exit 1 -EOF diff --git a/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml b/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml deleted file mode 100644 index a242ff148..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/np_dep/recipe/meta.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{% set version = "1.6.3" %} - -package: - name: fiona - version: {{ version }} - -source: - fn: Fiona-{{ version }}.post1.tar.gz - url: https://pypi.python.org/packages/source/F/Fiona/Fiona-{{ version }}.post1.tar.gz - md5: f68a470455f92cb45d56e4a549a2161c - -build: - number: 5 - preserve_egg_dir: True - entry_points: - - fio=fiona.fio.main:main_group - -requirements: - build: - - python - - cython - - setuptools - - numpy x.x - - gdal 1.11.4 - run: - - python - - setuptools - - numpy x.x - - gdal 1.11.4 - - cligj - - munch - - click-plugins - - six - -test: - imports: - - fiona - - fiona.fio - commands: - - fio --help - - conda inspect linkages fiona --name _test # [linux] - requires: - - nose - files: - - test.cpg - - test.dbf - - test.shp - - test.shx - -about: - home: http://github.com/Toblerity/Fiona - license: BSD License - summary: Fiona reads and writes spatial data files - -extra: - recipe-maintainers: - - ocefpaf diff --git a/conda_smithy/tests/integration/rendered_recipes/test.py b/conda_smithy/tests/integration/rendered_recipes/test.py deleted file mode 100644 index 6f05869b9..000000000 --- a/conda_smithy/tests/integration/rendered_recipes/test.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -import subprocess -import unittest - - -class Test_custom_matrix(unittest.TestCase): - priors = {} -# for fname in ['appveyor.yml', 'ci_scripts/run_docker_build.sh', '.travis.yml']: - feedstock_dir = os.path.join(os.path.dirname(__file__), 'custom_matrix') - child = subprocess.Popen(['conda-smithy', 'rerender', '--feedstock_directory', feedstock_dir], - stdout=subprocess.PIPE) - out, _ = child.communicate() -# self.assertEqual(child.returncode, 0, out) - # TODO: Make some assertions. - -class Test_np_dep(unittest.TestCase): - feedstock_dir = os.path.join(os.path.dirname(__file__), 'np_dep') - child = subprocess.Popen(['conda-smithy', 'rerender', '--feedstock_directory', feedstock_dir], - stdout=subprocess.PIPE) - out, _ = child.communicate() - - -if __name__ == '__main__': - unittest.main()