-
-
Notifications
You must be signed in to change notification settings - Fork 219
Support CircleCI 2.0 #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Support CircleCI 2.0 #530
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bf3e416
Move `circle.yml` to `.circleci/config.yml`
jakirkham c2ba579
Specify CircleCI 2.0 version in config.yml
jakirkham 3e73aef
Rewrite CircleCI config file for CircleCI 2.0
jakirkham fb0dd2c
Consolidate Jinja branches in CircleCI config file
jakirkham 5eae7be
Flip conditional order in CircleCI template
jakirkham 0394bdf
Convert everything into a CircleCI 2.0 Workflow
jakirkham d41df0a
Move CircleCI `build` into Jinja conditional
jakirkham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| {%- 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 %} | ||
| {# #} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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/
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.