Skip to content
Merged
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
3 changes: 2 additions & 1 deletion conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
83 changes: 47 additions & 36 deletions conda_smithy/templates/circle.yml.tmpl
Original file line number Diff line number Diff line change
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to check how the cache works in this new version. So we could place this command in a section which could be cached and need fewer changes to use ccache.

Copy link
Copy Markdown
Contributor

@gqmelo gqmelo Jun 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache is much more flexible and it seems we can choose exactly when to save and restore caches: https://circleci.com/docs/2.0/caching/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should resurrect the package caching work you did in this context. There are many pure Python or metapackages now floating around that have huge lists of dependencies that slow down the test phase due to downloading. Having a package cache there will certainly help the CIs cope with our ever increasing number of feedstocks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we should definitely revisit this. I can take a look after you merge this.

{%- 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 %}
{# #}