EmptyEpsilon
EmptyEpsilon copied to clipboard
Improve GitHub Actions to Build Artifacts
Change: This change uses GitHub Actions to build "testing" target releases on every commit/with every pull request.
It uses ubuntu-latest (18.04, soon to be 20.04 within the next day or two) to build Windows, Android, and Linux targets. It also builds a testing MacOS release, even though it is to be expected that MacOS will not be ever officially supported.
My proposal is this: Include this in your repository to encourage testing, and make it clear that these builds are NOT supported in any fashion unlike the official release builds. The MacOS build is helpful so those who have a Mac can use EmptyEpsilon even if it is not officially supported. You could potentially consider putting it on the main site as [UNTESTED, UNSUPPORTED] like Android is [BETA], just to provide easy access to the Mac builds, though the downside is people might still think it's "officially supported".
You need to be logged into GitHub to download the artifacts produced by these actions, so this will help prevent random people from downloading them thinking they are an official release. I hope that you will consider this Pull Request! Especially since GitHub Actions (including MacOS time) and Artifact Storage both are free to Public Repositories. Thanks!
As the android build uses a new key every build, installing the android version from actions will require you to uninstall it before you can install a new version...
I'm also not a huge fan of putting a gigabyte of data on github with every commit. No idea if they purge older artifact data, but feels wasteful.
We can do that with a cron action. A quick google led me to this: https://github.com/marketplace/actions/purge-artifacts
Android version - good point, what could be done instead is the key file is stored in the EE repo, though I’m not sure if there’s any security concerns there (though the passwords are public...)
By default artifacts are deleted after 90 days, but I could set them to expire in a few
days or a week to prevent the excessive waste. retention-days: 7
Made it reuse a keystore and delete all build files (except Script Reference) after 5 days. Let me know if you want any other changes. I thought of using one machine for Win32/Linux/Android but this feels cleaner in terms of making it clear which build failed, and it is faster too. However, if you want I will change this to one Ubuntu machine for Win32/Linux/Android.
Not a whole lot of data compression is happening as far as I know, other than what GitHub does by default (as artifacts are always zip files). If you want I could also compress the files using gzip to try to reduce the file size.
Oh yeah and GH actions decided to take downtime right around when I committed. It worked on my repo when I tested it https://www.githubstatus.com/
I’m not sure if there’s any security concerns there (though the passwords are public...)
There is, pretty sure the repo will get flagged for it. So adding a key to the repo feels worse then the generating a new key every time. There is a way to have a "secret" in which only actions on the daid/EmptyEpsilon can read then, but not sure how to set it up https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
Usage: Get the Base64 of a Keystore file, then upload it named as "ANDROID_KEYSTORE_BASE64". https://github.com/k9lego/EmptyEpsilon/settings/secrets/actions/new Let me know if you need any help! Personally I'd use a separate one from the official releases! :)
It seems that uploading the android artifact did fail on your last commit though.
Yeah I tested it on the branch “check” but it failed as a fork for some reason. My suspicion is it’s creating a blank file, I’ll troubleshoot it when I get a chance
Fixed the bug, sorry for the delay! Let me know if you have any feedback!
One thing that bugs me is the unzipping spam for Android, I might try to fix that soon or in another PR.
