Skip to content

CircleCI 2.0 Matrix#532

Merged
jakirkham merged 3 commits intoconda-forge:masterfrom
jakirkham:circle_2.0_matrix
Jul 23, 2017
Merged

CircleCI 2.0 Matrix#532
jakirkham merged 3 commits intoconda-forge:masterfrom
jakirkham:circle_2.0_matrix

Conversation

@jakirkham
Copy link
Copy Markdown
Member

@jakirkham jakirkham commented Jun 18, 2017

Fixes #203

Closes conda-forge/patchelf-feedstock#12
Closes conda-forge/pyelftools-feedstock#15
Closes conda-forge/rank_filter-feedstock#27

Requires PR ( #530 ) be merged beforehand. Already done.

Creates a proper build matrix on CircleCI 2.0 using the new Workflows. This allows us to have separate builds for Python and NumPy for instance. Though really this is not specific to those two. Instead applies to any environment variables that might be looped over and respected by conda-build. This is no-op when Linux builds are skipped. Also it is nearly a no-op for Linux builds that don't require a matrix as it makes some minor changes (whitespace and comments).

Some tests of this functionality can be seen in for the following cases:

  1. No matrix build: NO MRG, TST: Re-render with CircleCI matrix patchelf-feedstock#12
  2. Python only matrix build: NO MRG, TST: Re-render with CircleCI matrix pyelftools-feedstock#15
  3. Python and NumPy matrix build: NO MRG, TST: Re-render with CircleCI matrix rank_filter-feedstock#27

Would note that CircleCI seems to like to add one status per build in the workflow. There is no difference if there is no matrix. However for any case with a non-trivial number of matrix cases, has an equal number of statuses for the PR. This isn't too bad for just Python (3 cases). However for Python and NumPy this can be quite a bit depending on what version are available. There doesn't appear to be any obvious way to change this.

{%- for dep, ver in case -%}
{%- if dep not in vars_used %}
-e {{ dep }}="${{ "{" }}{{ dep }}{{ "}" }}" \
{%- do vars_used.append(dep) -%}
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.

Would add this macro seems pretty slow. Really what we would want here is a way to get a Python set in Jinja, but did not see an obvious way to do that. If others have suggestions, would be interested to hear them.

@patricksnape
Copy link
Copy Markdown

This would be very useful for Numpy builds +1 from me

Update the CircleCI configuration file, `.circleci/config.yml`, to
specify the different jobs in the matrix and set the relevant
environment variables for each build (if any). This results in no change
for the skipped Linux build case. Also if there are no environment
variables, that step is never added to the configuration file.
Changes the Docker build script to pass environment variables through
from the CircleCI build so as to influence the `conda-build` invocation.
This will make it unnecessary to build each matrix case sequentially
inside the Docker container.
As the matrix has now been successfully moved outside of the Docker
build script and into the CircleCI matrix, there is no need to have the
build matrix within the Docker build script and as part of one build.
Thus we cleanup this now no longer necessary content.
@jakirkham
Copy link
Copy Markdown
Member Author

Any comments, @conda-forge/core?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants