diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index 46f8e27f7..3ce69495a 100755 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -201,7 +201,7 @@ def render_circle(jinja_env, forge_config, forge_dir): for each_target_fname in target_fnames: set_exe_file(each_target_fname, True) - target_fname = os.path.join(forge_dir, 'circle.yml') + target_fname = os.path.join(forge_dir, '.circleci', 'config.yml') template = jinja_env.get_template('circle.yml.tmpl') with write_file(target_fname) as fh: fh.write(template.render(**forge_config)) @@ -665,6 +665,7 @@ def main(forge_file_directory): old_files = [ 'disabled_appveyor.yml', os.path.join('ci_support', 'upload_or_check_non_existence.py'), + 'circle.yml', ] for old_file in old_files: remove_file(os.path.join(forge_dir, old_file)) diff --git a/conda_smithy/templates/circle.yml.tmpl b/conda_smithy/templates/circle.yml.tmpl index bd32de35c..5c5be5688 100644 --- a/conda_smithy/templates/circle.yml.tmpl +++ b/conda_smithy/templates/circle.yml.tmpl @@ -1,39 +1,50 @@ -{%- block env_branches -%} -{%- if not matrix -%} -general: - branches: - ignore: - - /.*/ +version: 2 -{% endif -%} -{% endblock -%} -{% block env_dependencies -%} -{%- if matrix -%} -checkout: - post: - - ./ci_support/fast_finish_ci_pr_build.sh - - ./ci_support/checkout_merge_commit.sh - -machine: - services: - - docker - -dependencies: - # Note, we used to use the naive caching of docker images, but found that it was quicker - # just to pull each time. #rollondockercaching - override: - - docker pull condaforge/linux-anvil +jobs: +{%- block env_test -%} +{%- if not matrix %} + build: + working_directory: ~/test + machine: true + branches: + ignore: + - /.*/ + steps: + - run: + # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. + command: exit 0 +{%- else %} + build: + working_directory: ~/test + machine: true + steps: + - checkout + - run: + name: Fast finish outdated PRs and merge PRs + command: | + ./ci_support/fast_finish_ci_pr_build.sh + ./ci_support/checkout_merge_commit.sh + - run: + command: docker pull condaforge/linux-anvil + - run: + # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. + command: ./ci_support/run_docker_build.sh +{%- endif -%} +{%- endblock %} -{% endif -%} -{% endblock -%} -test: - override: -{%- block env_test %} -{%- if matrix %} - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - - ./ci_support/run_docker_build.sh -{% else %} - # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. - - exit 0 -{% endif -%} +workflows: + version: 2 + build_and_test: + jobs: +{%- block env_deps -%} +{%- if not matrix %} + - build: + filters: + branches: + ignore: + - /.*/ +{%- else %} + - build +{%- endif -%} {%- endblock %} +{# #}