Vlsir / Hdl21Schematics

Hdl21 Schematics
BSD 3-Clause "New" or "Revised" License
14 stars 2 forks source link

Seems Github Actions' Artifacts ain't quite ready for us #28

Open dan-fritchman opened 1 year ago

dan-fritchman commented 1 year ago

Specifically, this comment in our README won't fly, at least not for free -

https://github.com/Vlsir/Hdl21Schematics#installing-the-schematic-editor

Hdl21 schematics use GitHub Actions for per-build CI testing. This includes building the editor VsCode Extension and the desktop app for each supported platform: MacOS, Windows, and Ubuntu Linux (note https://github.com/Vlsir/Hdl21Schematics/issues/18). Note that GitHub Actions builds each on x86-architecture hardware. Other architectures - notably ARM64-based Macs - can instead be built from source. (And it's not hard!) Pre-built editors are downloadable from the artifacts section of each GitHub Action run:

Turns out they do allow free "artifact uploads"... but not much. 500 MB / month, according to this page, as of this writing:
https://docs.github.com/en/billing/managing-billing-for-github-packages/about-billing-for-github-packages

Now, it seems to actually grant a bit more than that. The screenshot of uploaded artifacts in that very same passage says that the app-bundle for its commit was 673 MB - so more than the limit to even upload one:

image

Whatever the actual limit is - maybe the 2GB or 10GB listed elsewhere in that table - we hit it in just a few commits.


What to Do

Umbrella options:

  1. Find another home for artifact storage
  2. Don't try to upload so much stuff

Under option (1) I'm all ears; I know there are plenty such providers out there, but don't have any particular preference/ affinity for, or experience with, any of them. Primary criteria: (1) must be 110% easy, both to produce from CI and to download, and (2) must be free (or, more accurately, not paid by this project's authors).

Under option (2):

It makes sense that the former would be much smaller. The desktop apps need the whole node runtime, electron libraries, whatever OS-specific stuff they use, etc. The VsCode Extension would just contain (I expect?) our code and its dependencies; all that other stuff is part of the VsCode application itself.

That said - it's concerning that the packaged VsCode Extension for recent (maybe all) CI-side builds is only about 200 KB. When I build it locally, I get a result artifact that is more like 14MB:

$ ll hdl21-schematics-vscode-0.0.1.vsix 
-rw-r--r--  1 dan  staff    14M Dec 11 13:41 hdl21-schematics-vscode-0.0.1.vsix

Perhaps that is relying on more "stuff" from the build environment than we realized.


For Now

Gotta at least get this out of the README as a recommended method of installation.

dan-fritchman commented 1 year ago

05a0868 has the easy part, temporarily removing the GH Artifacts from the README documentation.

curtisma commented 1 year ago

hmm, yeah, figuring out why the "app" is >600MB will be important. Maybe have it stored somewhere else instead. I believe Matthias has Klayout set up to upload to Dropbox.

For some of my projects, I've had them set up to release toGitHub Releases for all tagged releases. GitHub actions can include the generated artifacts as part of a draft release.

image

You could also reduce the lifetime of artifacts.

For the VS Code extension, you could have it released to the VS Code marketplace and distribute it that way.

ThomasPluck commented 1 year ago

Seconding upload to VS Code Marketplace, this is a very convenient method.

dan-fritchman commented 1 year ago

Totally agree!