-
Notifications
You must be signed in to change notification settings - Fork 79
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
Added Build&Deploy for mac-os
#229
Added Build&Deploy for mac-os
#229
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #229 +/- ##
========================================
Coverage 45.76% 45.76%
========================================
Files 84 84
Lines 9096 9096
========================================
Hits 4163 4163
Misses 4933 4933 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Ok, I have tested the relevant wheel downloaded from here in a new Python 3.10 virtual environment, but it does not work, which is not surprising because the builds are only for x86 architectures and I have an M1 chip. I think this tool can help us? I will give it a go. Edit: I don't have access to an older Mac machine, maybe @dalonsoa does? Either way, if we have to use the cibuildwheel tool to make the wheels for M1/Apple Silicon architectures, I suppose we will have to test them again anyway. |
I'm afraid this is not correct. While you can build wheels for linux this way, PyPI only accept wheels created with As for MacOS, it seems building things in MacOS is not working, so I have no wheel to test, I'm afraid. |
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.
See my other comment.
@dalonsoa the macOS builds in my (separate) branch are failing for some reason I don't understand, but @Abelarm's are working, just only building on push so they are on his fork here. Would be great if you could test it, since I don't have a Rosetta environment set up. I really would like to get this working on M1 chips too because I will not be the only person who wants to use Solcore on a new Mac - so I will keep trying on that front. |
Very true - sorry for the confusion @Abelarm ! So, the MacOS wheels do work in my laptop totally fine and I'm able to run the PDD solver without compiling anything. However, I do have a fortran compiler installed. As you have pointed out, we should statically link everything so a compiler is not needed. That is taken care for linux in the Otherwise, I'm happy this works - at least for non M1 chips! |
@phoebe-p , it seems that |
I actually had the MacOS x86 build using |
Indeed, it does work. Funny enough, it triggers the safety features of MacOS and I need to manually authorise one by one a bunch of fortran libraries bundled with the Interestingly, the |
Ok, sorry to derail this PR with discussion about the M1 wheels/use of On the bright side, since the last time I tried (#209), compiling the PDD locally on my own system is now as easy as before (i.e. it just works with homebrew gcc/gfortran 12.2.0), so it is also less urgent that we provide wheels to M1 macOS users. Of course, I could simply build the wheels for different Python versions on M1 myself for the time being, but I don't think there is a way of integrating that with the automated release to PyPI which we are trying to build here. |
Guys sorry If i didn't participate actively in the discussion (which was extremely interesting) but I had really some rough days at works. But now I should be able to follow it more actively. So if I got it correctly, at time of writing, we cannot build solcore for |
…dos and macos, added static linking to all platforms
5337174
to
6c54c55
Compare
Ok code changes applied, the sad thing is that we still need to keep the ugly
really not an expert on gfortran and static linking so 🤷♂️ |
2ce3f18
to
01b736c
Compare
FWIW, Linux is pretty strict about statically linking non-relocatable archives into a shared library. Unfortunately it appears that the devtoolset developers provide an archive with non-sharable code. If you dynamically link against libgfortran, the That being said, I would think libgfortran is available on most Linux systems. Similarly for macOS, the |
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.
A couple of minor changes, but otherwise it looks good to me!
@phoebe-p , after this is merge we need to update the documentation to reflect this changes in the installation process, so maybe when we do that, you can mention the instructions about compiling things for M1. |
@Abelarm , I tested this already for MacOS and it was working, so you can tick that. Do not remove the upload artefact part, as I think it is useful to have the binary wheels available for dev versions. |
9891caa
to
4b7692e
Compare
Thank you @tcaduser for the really detailed answer, really great!! Regarding the PR @dalonsoa I think everything is tidy and clean now, I ma not sure we should trigger the whole build for each push, probably leave it as it was before (triggering only on a specific branch) would be better :) |
I'm glad to help. I have been going through the process of package packaging lately, and it is tricky. You may want to use something like However it may not matter if all systems have it by the same name. On Ubuntu 22.04:
On manylinux2014:
I have not tried Solcore yet, and I am very interested trying the drift diffusion simulation. |
This a page specifically referencing |
Whoa a lot to learn here... 😃 I think it's already possible to try the
@dalonsoa correct me if I am wrong |
OK, let's trigger it only for |
Removed too many blank lines Inverting the order to see it runs Rolling back
c4a4cee
to
88db146
Compare
Resolving the #139
I have added the build_deploy command for
mac-os
integrated with the windows one. Added themac-os
(darwin
) to the platform to which apply static linking.TODO before merging:
mac-os
fix_deploy