Skip to content
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

Improvements to GitHub Actions workflow #90

Merged

Conversation

Gorialis
Copy link

@Gorialis Gorialis commented Jun 2, 2022

This does a few minor things

  • Fixes on.release.types to be an array like defined in the spec
  • Adds the workflow_dispatch trigger, which allows repository maintainers to manually trigger the workflow against any branch or tag. This is helpful for forks because it allows non-master branches to be tested by Actions before opening a pull request.
  • Adjusts the workflow script to make upload_artifact pack from a folder instead of a zip. This avoids the annoying zip-inside-zip side effect that somehow still hasn't been fixed.

@ElektroKill
Copy link
Member

* Adjusts the workflow script to make `upload_artifact` pack from a folder instead of a zip. This avoids the annoying zip-inside-zip side effect that somehow [still hasn't been fixed](https://github.com/actions/upload-artifact/issues/39).

One minor concern with this, I'm pretty sure that the upload artifact task by default does not utilize compression of any sort and dumps the file in a zip. I did not remove the double zip because dnSpy is a rather large download when uncompressed (around 200 megabytes) while compression reduces it down to 80 MB. This benefits people with slow internet connections or ISP set data caps when they want to download dnSpy from GitHub Actions. Did the task start compressing files since I last played around with the workflow or does it still just zip the files without any compression? If it's the latter I would like to go back to the double zip as it's only a minor inconvenience for people with fast internet but could be a big game-changer for people with slow connections.

@Gorialis
Copy link
Author

Gorialis commented Jun 2, 2022

GitHub Actions displays the artifact as the sum of its contents, but the vended file is nonetheless compressed and is around the same size as it would be otherwise. You can try it here: https://github.com/Gorialis/dnSpy/actions/runs/2429978866

It shows as the larger size, but downloads as the smaller.

image

@ElektroKill
Copy link
Member

It shows as the larger size, but downloads as the smaller.

That's great! LGTM!

@ElektroKill ElektroKill merged commit 8f59af4 into dnSpyEx:master Jun 2, 2022
@Gorialis Gorialis deleted the enhancements/gha-no-double-zip branch June 2, 2022 19:04
@seanralexander
Copy link

Did this not increase your upload times from 3s, 6s, 8s to 30s, 58s, 1m 1s?
image
image

@ElektroKill
Copy link
Member

ElektroKill commented Jun 6, 2022

Did this not increase your upload times from 3s, 6s, 8s to 30s, 58s, 1m 1s? image image

Yes, it did. This is because the compression is now handled (I think so) under the upload-artifact step instead of being done under the Build dnSpy step. It could be that the task also just uploads the raw files and the compression occurs later. I'm not familiar with the internal workings of the upload-artifact task so I'm just assuming :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants