Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: Build merged version on CircleCI #20680

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 10 commits into from
Jul 21, 2021
Merged

Conversation

larsoner
Copy link
Contributor

@larsoner larsoner commented Jul 19, 2021

PR Summary

  1. Build a merged version of each PR instead of the branch itself on CircleCI.
  2. Update circleci-artifacts-redirector-action to say "Check the rendered docs here!" as its GitHub status title, but this will only take effect once this PR is merged (because the action is triggered by status and thus always runs on whatever is in the action in master).
  3. Add [skip circle] and [circle skip] support to skip CircleCI
  4. Add [skip azp] and [azp skip] support to skip Azure
  5. Document in devdocs that these skip options exist, alongside [skip actions] and [skip appveyor] (which are natively supported by those platforms)

Closes #20658

PR Checklist

  • [N/A] Has pytest style unit tests (and pytest passes).
  • [N/A] Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@larsoner
Copy link
Contributor Author

I noticed also that there is no way to skip Azure runs, let me know if you want me to port over the 30 or so lines that allow using [skip azp] in a commit title:

https://github.com/mne-tools/mne-python/blob/f3a7dece8d4361265e055f617e98c197c7cba07e/azure-pipelines.yml#L16-L36

Or the SciPy variant that allows having that same thing anywhere in the commit message:

https://github.com/scipy/scipy/blob/5b3a3b440525aa5038e2cead1f9b4f23a610cd9f/azure-pipelines.yml#L35-L54

(Both were developed originally for MNE by @GuillaumeFavelier !)

@larsoner
Copy link
Contributor Author

larsoner commented Jul 19, 2021

Couldn't resist the temptation to put [skip azp] in there (EDIT: the SciPy variant where [skip azp] can be anywhere in the commit message), seems to be working:

https://dev.azure.com/matplotlib/matplotlib/_build/results?buildId=20049&view=results

I'll push a commit without it in there just to make sure I didn't break the main tests, though...

@larsoner
Copy link
Contributor Author

@jklymak
Copy link
Member

jklymak commented Jul 19, 2021

OK, but maybe the skip command needs to be documented in the dev docs somewhere? Though I'm not sure under what conditions we'd skip Azure versus the other tests...

@larsoner
Copy link
Contributor Author

Though I'm not sure under what conditions we'd skip Azure versus the other tests...

For just one example, if you just want to update some documentation wording and make sure you didn't do something bad RST/Sphinx-wise, something like [ci skip] is inappropriate because CircleCI won't run, and it's wasteful to run the Azure and GH-Actions tests just for a tiny doc update.

For another example, maintainers doing CI maintenance like in this PR where just .circleci/config.yml is changed but you want to make sure things still work, same story about Azure and GH-Actions.

I have found having this level of individual control over each CI provider to be pretty useful over the years of maintaining repos.

@jklymak
Copy link
Member

jklymak commented Jul 19, 2021

Maybe I misunderstood, does this also skip all the GitHub action tests somehow?

@larsoner
Copy link
Contributor Author

OK, but maybe the skip command needs to be documented in the dev docs somewhere?

Maybe I misunderstood, does this also skip all the GitHub action tests somehow?

No, [skip actions] does this, and is built into / dealt with by GH-Actions automagically, just like [skip appveyor] is built into AppVeyor, and [skip travis] is built into Travis. On the other hand, CircleCI and Azure do not support these out of the box, so the code added here adds support for them.

I just pushed a doc update that hopefully makes it clearer

@larsoner
Copy link
Contributor Author

[skip circle] works now:

https://app.circleci.com/pipelines/github/matplotlib/matplotlib/10539/workflows/dfc52fcc-fef4-4279-93c1-7b930bed224f/jobs/62400

Will push a commit to skip everything except Circle so that we can see that the doc-only change to the devdocs I made doesn't break anything...

@QuLogic
Copy link
Member

QuLogic commented Jul 19, 2021

Now you need to commit without skipping Circle though, to see the merging worked.

@larsoner
Copy link
Contributor Author

Now you need to commit without skipping Circle though, to see the merging worked.

You can look at any of the commits that preceded that one above, e.g. https://app.circleci.com/pipelines/github/matplotlib/matplotlib/10541/workflows/1a5c01bb-2de1-4053-90a8-ebdd6898c06c/jobs/62402/parallel-runs/0/steps/0-103. But I'll push another one without any skips once we settle on if the file-based method is good enough or if I need to dig into bash more...

@larsoner
Copy link
Contributor Author

Merge worked, and it's building:

https://app.circleci.com/pipelines/github/matplotlib/matplotlib/10573/workflows/a164cea0-930c-4151-a0a8-eeccaf67c1ec/jobs/62444/parallel-runs/0/steps/0-103

Will now push another commit with [skip circle] just to make sure I didn't break that

@larsoner
Copy link
Contributor Author

larsoner commented Jul 20, 2021

[skip circle] worked https://app.circleci.com/pipelines/github/matplotlib/matplotlib/10574/workflows/d5cedeb0-adbb-493f-94fc-02c482e8f8db/jobs/62445/parallel-runs/0/steps/0-102

FYI @QuLogic I fixed up the shell scripting to avoid using files in the process.

@QuLogic QuLogic added this to the v3.5.0 milestone Jul 20, 2021
@QuLogic QuLogic merged commit ae2a3b1 into matplotlib:master Jul 21, 2021
@larsoner larsoner deleted the circle branch July 21, 2021 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MAINT: CircleCI build merged PRs
3 participants