-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add Linux and Mac arm platforms #352
Conversation
* use CONDA_SUBDIR and CONDA_CHANNELS * adds osx-arm64 and linux-aarch64 platforms * uses Conda to determine the platform This last point is important espeically for Apple M1, which can run as the osx-64 platform. Users will now be able to force the platform by setting CONDA_SUBIDR=osx-64 before running anaconda-project commands.
if the .condarc file is not set then CONDA_CHANNELS does not know to include defaults
the msys2 channels has empty repodata for non-windows platforms
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.
This looks great, but do we have a handle on those CI failures?
By the way, I'd be open to dropping Python 2.7 support if necessary. |
I'm going to keep working on the tests. I may wait to drop 2.7 tests when I complete a PR to add py 3.9 testing. I think some tests fail when anaconda-project is installed in py 3.9 env and I'ld check if there are bugs. |
the original version seemed to solve for python 2.7 on win-64. Hopefully this will fix windows tests in the action.
at least run more tests to find out why windows may be failing
there was no need to install the pip package multiple times also made sure to use modern python version
For those here who are interested I've gotten tests passing for all but three scenarios added the following exclusions to the github action. The Ubuntu Conda 4.8 + py 3[7-8] fail for one test that checks a timestamp on the live project environment, but it does not exist for older or newer versions of Conda. I plan to drop testing support for Py 2.7 in the near future. # Odd timestamp behavior
- pyver: 3.7
os: ubuntu-latest
cver: 4.8
- pyver: 3.8
os: ubuntu-latest
cver: 4.8
# Old versions will be trimmed from tests soon
- os: windows-latest
pyver: 2.7
cver: 4.6
- os: windows-latest
pyver: 3.6
cver: 4.6 |
A question for those of you who maybe interested (@jbednar , @jlstevens , @philippjfr ?). Anaconda Project had previously decided that the default platforms are linux-64, osx-64, and win-64. You see this when initializing a project or locking a project platforms:
- linux-64
- osx-64
- win-64 At some point
|
oh, nevermind above! Anaconda Project already does option 2 above. I just need to adjust tests to account for this. Some tests were not originally intended to run on non default platforms hardware. |
some quick fixes where paltforms was hardcoded or where conda_api.default_platforms_with_current() is a better choice in assertions.
found a scenario that works on osx-arm64
these tests had explicit platforms listed so it's ok to add some non-default platforms
some tests intentionall do not set platforms in the project yaml. If the test is run on a non-default platform, like osx-arm64 the hash is different because the platforms list is different. A mocked logical_hash is used when necessary to remove the platforms so that the test can pass on all hardware.
get CI tests passing again
Tests pass on all platforms. Any comments or concerns before I merge? |
This adds
linux-aarch64
andosx-arm64
as known platforms.Further, this PR also solves #274 and allows
CONDA_SUBDIR
env var to be used to override the current platform.For example, on an Apple M1 you can now force it to create envs for osx-64. First you'll see that Conda determines my platform is osx-arm64. I can force anaconda-project to create an osx-64 env_spec by setting
CONDA_SUBDIR=osx-64
. Otherwise the prepare would fail because Python 3.7 is not available for osx-arm64. Note that you must keep CONDA_SUBDIR set for all anaconda-project actions, not just the prepare step.