-
Notifications
You must be signed in to change notification settings - Fork 757
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
Move from Travis-CI (and Appveyor?) to GitHub Actions #5261
Comments
Thanks Brian - great write-up. After a little bit of though about possible ways to get started on this, I have been wondering about having some kind of shared online meeting, with screen sharing, where the 4 of us take a high-level look at what GHA offers, and how it works - by way of an introduction for those who haven't seen it, and a sharing of knowledge between those who have. I think that this will start to generate a list of the kinds of structural decisions that would be useful to think about early on - and that might help drive and inform the early actions. It would potentially also share info about what stuff comes for free, quick ways to get started, and useful resources for when you get stuck. I don't know who amongst us has most experience with GHA, but if it helps, I would be happy to talk through what I've learned, and what I know that I don't know, about it so far - for others to fill in the gaps. Equally, I would be very happy if someone else started the demos and then I joined in with gap-filling... This is just a starting suggestion to get the discussion going. I am not at all wedded to the idea - others are very welcome! |
The kinds of topics to consider include:
|
Sharing what I've learned so far - correct me if I'm wrong please:
AFAIU a Workflow is an upper logical unit of GHA. I.e. there may be multiple jobs in one Workflow. I imagine we could structure our CI in few different ways, e.g.
These are just propositions for further discussion of course. Actions are "standalone commands that are combined into steps to create jobs" (from the intro) - it seems that Actions can come from GH or from community repos
Here are links to available configurations. Few of my notes:
I think this is a very good question, also would circle back to how we would structure our workflows |
All right, here's my first pass on this: https://github.com/dyfer/supercollider/actions/runs/380527549 This is a single linux job, no ccache, no linting, no build matrix or configurability through environment variables (like we have currently with Travis). But it builds SC successfully and uploads the artifact (I know this is not useful on linux RN but wanted to test) There seem to be some more GHA-idiomatic ways of performing certain actions, particularly:
Also the linux runner seems to be faster than Travis I think (at least when I ran it) - the full build took ~8 minutes (without ccache) EDIT: ...and I haven't tried implementing unit tests |
Wow, that YML file is a thing of beauty and simplicity, @dyfer ! |
thanks, @claremacrae ! |
macOS job is also up now: https://github.com/dyfer/supercollider/actions/runs/382257003 |
I switched to Ninja, and SC now starts properly: https://github.com/dyfer/supercollider/actions/runs/383901328 However, the downloads are large, ~250MB (vs <100MB for 3.11). After unpacking, these builds are >500MB ( vs <250MB for 3.11). The main difference is I know that 3.11 was build with older XCode. Is this the reason for this size increase? Or is something else going on? |
I’d check architecture settings- these sound like fat binaries.
Josh
/*
Josh Parmenter
www.realizedsound.net/josh
*/
… On Nov 25, 2020, at 12:34, Marcin Pączkowski ***@***.***> wrote:
I switched to Ninja, and SC now starts properly: https://github.com/dyfer/supercollider/actions/runs/383901328
However, the downloads are large, ~250MB (vs <100MB for 3.11). After unpacking, these builds are >500MB ( vs <250MB for 3.11). The main difference is QtWebEngineCore.framework: in this build it's 460MB, in 3.11 it's 150MB (unpacked)
I know that 3.11 was build with older XCode. Is this the reason for this size increase? Or is something else going on?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
whatever action you are using to zip and upload the artifact doesn't preserve symlinks, so many files and directories are being copied into the archive multiple times. edit - to elaborate, macOS bundles/frameworks have a specific internal structure that makes use of symlinks, and if you resolved all of those symlinks, you'd end up with at least 2x the size. the webengine app is even worse here because all of its internal frameworks are just symlinks to frameworks from the outer bundle. |
thanks for finding this @brianlheim I'll keep an eye out for symlink support solutions |
Homebrew/brew#7857 for the homebrew discussion. https://bugreports.qt.io/browse/QTBUG-85279 looks like the top level Qt bug tracker ticket, from the info there it looks like only 5.15 and 6.0 will support apple silicon. not 100% sure though. |
It sounds like you found it - but I was thinking more that possibly x86 and x86_64 may have been getting included (32 and 64-bit).
I would expect all sorts of build failures if it was trying to include M1 as well… though, to be honest, there may even be x86 problems? Maybe?
Regardless, I think we have only cared about 64-bit builds for some time.
Josh
… On Nov 25, 2020, at 13:20, Brian Heim ***@***.***> wrote:
Homebrew/brew#7857 <Homebrew/brew#7857> for the homebrew discussion.
https://bugreports.qt.io/browse/QTBUG-85279 <https://bugreports.qt.io/browse/QTBUG-85279> looks like the top level Qt bug tracker ticket, from the info there it looks like only 5.15 and 6.0 will support apple silicon. not 100% sure though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#5261 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAANHLHWG6GTNFQQC323OEDSRVYIFANCNFSM4UADNR4A>.
|
Thanks for the link. I guess offering a separate download for arm64 vs x86_64 is not the end of the world, at least for a time.
Ah, got it. Sorry about misunderstanding, I was thinking about arm64. Yeah, we haven't been building x86 on macOS for a while. |
Zip symlink issue is now solved, I'm just creating the zip "manually" before the artifact upload step - https://github.com/dyfer/supercollider/actions/runs/384592997 Next:
EDIT: Re: earlier consideration about the file structure - I'm leaning towards putting everything in one yaml file, at least for now. |
Update:
https://github.com/dyfer/supercollider/actions/runs/389305122 |
This is great progress, @dyfer Has there been any discussion about making the CI mostly call scripts? One of the things I've admired about SuperColider's CI is that, as far as I can see, it calls out to scripts on disk, such as: https://github.com/supercollider/supercollider/tree/develop/.travis I had wondered whether some such scripts might be more generally useful, e.g. to a developer on a particular platform... And so might be moved out of a .travis-specific directory, so they are reusable and more discoverable? Whether they are moved or duplicated, having the scripts in .sh or similar might also allow some components of the CI builds to be tested on dev machines/VMs before committing... |
I'm happy to have a discussion about using the scripts, as they have been used for Travis. For me personally, it was rather confusing to find out what was happening in which script, and where environment variables were set. I won't insist having everything in one file is better, but that works better for me personally ATM. |
BTW I now have most of the linux build matrix implemented. https://github.com/dyfer/supercollider/runs/1469485607 gcc 5 is available, but in ubuntu 16.04 image, which comes with older qt (5.5). I've set up a different action to install arbitrary qt version, but that has recently broken, so for now I disabled the build with GCC 5. TODO: ccache, macOS build matrix, possibly Windows builds, testing (!) Also: clang-format-8 is available in the runner image. Could we use that instead of downloading our own? Does it need to be an exact version? |
yes, absolutely
this is fine for now, since we are moving to c++17 soon we will want to drop a few of the older compilers anyway. i think we'll still want to have gcc 6 and clang 7. clang 11 is also available now i believe.
this should be as easy as installing the package and making sure it's in path; the build system will pick it up automatically. but then you also need to preserve the cache across builds. speaking of which, can we cache homebrew or apt on these machines and is that something recommended by GHA docs? i remember on travis they said not to do it. since travis is apparently decommissioning more of their linux machines, we are probably going to now start seeing increasingly bad build delays (last week i think we saw some builds take almost a full day) judging from this traviscistatus.com graphic. so perhaps you could make a PR this week and get us switched over minimally, and then we can continue adding features as needed? |
@claremacrae Fail-fast is on by default with GHA, so you'll have to turn it off explicitly (see: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast). |
Just did in my GHA integration branch. |
I believe that "set -o errexit" is one of several options that spots mistakes in shell scripts much earlier... and avoids time spent debugging them. Having said that, the ones I tend to use are:
|
Yes thanks - sorry I was unclear in my wording... |
Also thanks for making this transition so quickly! I just converted from Travis to GHA for my SC Python client library and I'm generally quite happy. GHA doesn't do as good a job with live log output, but otherwise we're good. And ℹ️ I can report that you can boot both Jack and scsynth inside GHA runners. |
That's great! Thanks for reporting. |
Update:
https://github.com/dyfer/supercollider/actions/runs/391176708 |
this is awesome news @josiah-wolf-oberholtzer ! |
Note to self, to make it easy to see @dyfer's branch for this work: |
@dyfer Hi Marcin, I just wanted to say a huge thank you for all your work on this ticket - not least because of how much I have learned from what you have done. This evening I have been able to move over to GHA almost all the Travis builds from a project I work on - and also make a bunch of other simplifications to that project's GHA config! 🙏 |
update/recap:
not implemented/todo:
notes: tl;dr I'd like to step away from this for a few days. I think this is in a reasonable shape to provide basic substitution for Travis, with some functionality missing as indicated above. What do you think @brianlheim @claremacrae ? |
@dyfer yes, this is amazing, thank you so much!!! i'm happy to help with the deployments to S3 and GitHub Releases, it would be nice to not have any continuity breaks in S3 during this switch over. everything else can be fixed later. no worries if you want to leave it for a few days. can you make a PR now though? then i can review and/or push to the branch. the travis backlog is getting worse by the day so i really want to make this switch ASAP. |
@brianlheim great, I'll make a PR. |
note to self - put my secrets in https://github.com/supercollider/supercollider/settings/secrets/actions |
note - when removing travis CI support, also remove the travis_test_run_proto.json file from the repo |
sorry @dyfer I just realized I never responded to this:
if you still have any interest or if you already wrote it I'm sure it could be useful on our wiki too :) |
How about this? https://github.com/supercollider/supercollider/wiki/GitHub-Actions-migration-notes |
Writing down so I remember - the last step before closing this would be to update our Wiki, changing references to Travis and AppVeyor as needed. We should probably also update the main Readme (the EDIT: here's the wiki page that needs to be updated |
New Wiki page has been added: https://github.com/supercollider/supercollider/wiki/Continuous-Integration---GitHub-Actions |
Motivation
see #5252 for prior discussion; a brief summary is that we need to move off travis-ci to a new CI provider by the end of the year, and github actions seems to be the best option at the moment.
to reiterate, with GHA we would get unlimited and free builds on all 3 platforms we use with multiple concurrent jobs.
Description of Proposed Feature
we will move our entire build matrix from Travis over to Github Actions, and possibly our Appveyor builds too. the reasons we would switch over from appveyor are:
we need some research to figure out how much would effort it would take migrating from Appveyor. this is also lower-priority since we don't have the same end of the year deadline. it would just be nice if it worked out.
Plan for Implementation
@dyfer , @joshpar , @claremacrae so far have offered to help with this. i'm also of course interested in helping. i'd really like to have multiple people involved so the knowledge can be shared, and hopefully some documentation for everyone else will come out of it too!
The text was updated successfully, but these errors were encountered: