X Tutup
Skip to content

Start using Cirrus CI#24597

Closed
oscargus wants to merge 1 commit intomatplotlib:mainfrom
oscargus:cirrusci
Closed

Start using Cirrus CI#24597
oscargus wants to merge 1 commit intomatplotlib:mainfrom
oscargus:cirrusci

Conversation

@oscargus
Copy link
Copy Markdown
Member

@oscargus oscargus commented Dec 3, 2022

PR Summary

I expect quite a few attempts...

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@oscargus oscargus marked this pull request as draft December 3, 2022 14:27
@oscargus oscargus force-pushed the cirrusci branch 25 times, most recently from 5686fcf to 1ca320e Compare December 3, 2022 17:33
@oscargus
Copy link
Copy Markdown
Member Author

oscargus commented Dec 3, 2022

Giving up for now.

For FreeBSD, I get the following error when running pip or python

ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.7m.so.1.0 not found

so something is wrong with the install.

For MacOS and Linux ARM64, the following happens

Successfully installed matplotlib-0.1.0.dev45061+g1ca320e
...
ERROR  - ImportError: cannot import name '_c_internal_utils' from partially initialized module 'matplotlib' (most likely due to a circular import) (/tmp/cirrus-ci-build/lib/matplotlib/__init__.py)

Not sure if they are related, but it would be nicer if the version numbering worked properly to start with...

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Dec 15, 2022

I see stuff like:

    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'setuptools'. No files were found to uninstall.

and

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

These are Debian system paths. Perhaps it would be best to follow that advice and create a venv.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Aug 11, 2023

This is now good on aarch64 due to changes here and the linked PRs. The M1 macOS build should also pass, but it's failing due to homebrew breakage. I don't know if we want to continue to use mactex; it seems to take the majority of the OS setup part of the build.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Aug 12, 2023

OK, adding a brew update fixed the mactex install. The sigint failure is still happening a lot; we should probably add an xfail on that as well.

@oscargus
Copy link
Copy Markdown
Member Author

There was a recent post on the numpy-mailing list that they are now exceeding the free quota on Cirrus. Not sure if it will become a problem for us as well, but I can imagine it may be. Especially since our tests takes quite a bit of longer time.

Anyway, as a small counter measure it has been suggested running their tests in sequence, starting with the linux one numpy/numpy#24435

We may consider having these optional as well, just running them with a certain label or similar.

@oscargus
Copy link
Copy Markdown
Member Author

Setting up the Mac environment seems to be the major culprit here. Not sure if we are charged all four CPUs during that time and/or it we can try to make use of all four CPUs somehow to reduce the install time? In general, adding a 39 minute test seems a bit unfortunate. But maybe we can reduce that using caching and/or our own image?

@oscargus
Copy link
Copy Markdown
Member Author

Scrolling back I note that you have already noted the potential issue...

However, I also noted this log message:

==> You have set:
  HOMEBREW_NO_AUTO_UPDATE
but we have dramatically sped up and fixed many bugs in the way we do Homebrew updates since.
Please consider unsetting these and tweaking the values based on the new behaviour.
Installing from the API is now the default behaviour!
You can save space and time by running:
  brew untap homebrew/core

which seems to be set by the image? Maybe one will just have to wait for the image to be updated...

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Aug 18, 2023

One of the biggest time sinks on macOS M1 is installing MacTeX; we may want to not do that to save some time.

This was referenced Aug 26, 2023
@oscargus
Copy link
Copy Markdown
Member Author

Just noting this (should be solved at some stage I guess, but not required for merging IMHO):

Successfully installed matplotlib-0.1.0.dev48306+g388057b

for both runs.

I guess that means that there are still issues for some users to install from source as well?

@oscargus
Copy link
Copy Markdown
Member Author

Btw, do we know if previous tests will be cancelled when pushing a new version?

Considering the limited resources, we should try to confirm this/make it happen...

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Sep 14, 2023

Successfully installed matplotlib-0.1.0.dev48306+g388057b

This is because their checkout does a shallow clone without tags.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Sep 19, 2023

Btw, do we know if previous tests will be cancelled when pushing a new version?

Yes, it seems so on any branch other than main: https://cirrus-ci.org/guide/writing-tasks/#auto-cancellation-of-tasks

@ksunden
Copy link
Copy Markdown
Member

ksunden commented Sep 19, 2023

May be worth modifying it so that it does cancel even on main (or perhaps even to not run again on every commit to main)

@oscargus
Copy link
Copy Markdown
Member Author

I tried to see if one somehow can trigger the runs based on setting a specific label, but to no avail.

An option is to use manual https://cirrus-ci.org/guide/writing-tasks/#manual-tasks and then do a bit of a guessing game if the PR may affect anything... (Not sure exactly who can trigger it though.)

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Sep 30, 2023

Successfully installed matplotlib-0.1.0.dev48306+g388057b

This is because their checkout does a shallow clone without tags.

This is fixed now by adding the git fetch --tags.

I tried to see if one somehow can trigger the runs based on setting a specific label, but to no avail.

I'm not sure we should try to optimize too much before finding out if we're going to end up close to the limit.

@ksunden
Copy link
Copy Markdown
Member

ksunden commented Oct 2, 2023

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Oct 3, 2023

It looks like those are xlarge runners, which are only available for GitHub Team or GitHub Enterprise Cloud plans. So we'd still need to wait some more.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Oct 11, 2023

Comparing the previous build on aarch64, it took >2min to build, and now takes 34s, a factor of about 4, which matches CPU count. So the Meson build does seem to be taking advantage of all CPUs as expected. On macOS, it was 43s and now 15s, which is only 3x, but that might be too fast already.

Oddly, there are new image failures on aarch64. I'm not sure why that's happening as that test image doesn't seem to have changed. Perhaps it's about optimizations or similar.

@QuLogic QuLogic mentioned this pull request Jan 31, 2024
1 task
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Jan 31, 2024

It appears we have waited long enough, at least for M1 macOS: #27723

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@dstansby
Copy link
Copy Markdown
Member

Is it worth closing this now we can get native M1 runners on GH actions? #27723

@oscargus
Copy link
Copy Markdown
Member Author

Unless we think that aarch64-Linux is worthwhile, I'd be happy to close this.

@dstansby
Copy link
Copy Markdown
Member

aarch64-linux runners are available on GH actions now now: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/, so I think this has become redundant?

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 20, 2025

Yes, I think unfortunately or fortunately, this PR is no longer needed.

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

Labels

CI: testing CI configuration and testing status: needs rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup