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
Standalone workflow #3018
base: master
Are you sure you want to change the base?
Standalone workflow #3018
Conversation
@superboyiii @shargon Where do you guys get Edit: |
@gsmachado Can you test on |
@shargon can you test/check out? |
Would you like a |
OK. Let's remove leveldb. |
Still needed for windows though. |
@@ -0,0 +1,52 @@ | |||
{ |
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.
can we use/copy the config files from the source?
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.
they are for the debian packages, They need a custom storage
path.
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.
But it's possible to copy them in the script?
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.
I have a script. build-dpkg.sh
I think the name is. I need these templates. I can look into a way of changing the data for the config
json
files.
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.
@cschuchardt88, can you copy the files and change them with sed
?
I think it will be better for maintenance.
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: 'Version Number (Example: 1.0.0)' | ||
required: true |
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.
Just a suggestion: don't we want to automatically run this job on GH release trigger?
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.
We alway did it this way. This Creates a Release automatically after building it. With binaries add to release.
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.
I understand, but how about moving from manual trigger to automatical? Like this:
on:
release:
types:
- published
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.
Wouldn't that trigger after a release though? Workflow goes like this.
- Build Binaries & Cache binaries
- Get cache & Build Debian packages & Cache again
- Get cache & Publish Release with binaries
- Clean-up Caches
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.
Well, exactly for situations like this we have gh release upload
. So the adjusted pipeline is the following:
- Create and publish release on GitHub, that will trigger
release
GH event - Grab released ref. from
release
event, Build Binaries & Cache binaries - Get cache & Build Debian packages
- Upload release artifacts from step 3 (IMO, caching isn't needed here).
- Get artifacts from step 4 & Attach binaries to the GH release
- Clean-up Caches
And with this pipeline you don't need a special person who manually pushes action activation button. Instead, workflow starts automatically immediately after release and in the end attaches resulting binaries to the release page. Take a look at this pipeline implemented in https://github.com/nspcc-dev/neo-go/blob/master/.github/workflows/build.yml, and especially pay attention to the following steps:
- uploading release artifact: https://github.com/nspcc-dev/neo-go/blob/32fab1adf1358617ab96d0472ccf08b69e515f72/.github/workflows/build.yml#L70
- attaching binary to the release: https://github.com/nspcc-dev/neo-go/blob/32fab1adf1358617ab96d0472ccf08b69e515f72/.github/workflows/build.yml#L77
At the same time manual workflow dispatch can be kept "just in case", if something goes wrong with the automatically triggered job.
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.
I'll read more into this when i have time. But i thought you should know, we can't use artifacts. We eat up space so fast and only have something like 500MB for that. Our space is very limited.
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.
Guys... we need the binaries/artifacts to be uploaded somewhere. This would enable people to just download and use it. Also, for brew
, relying on binaries/artifacts with an SHA-256 file is the best fit.
If we're so miserable for not being able to pay more than 500Mb of storage in GitHub, my suggestion is: create an Amazon S3 bucket (or, in Digital Ocean) and add it there. Wdyt?
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.
https://github.com/nspcc-dev/gh-push-to-neofs/
Can even use some static nuget feed generator to have proper feeds.
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.
@shargon need you here
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.
If we're so miserable for not being able to pay more than 500Mb of storage in GitHub
Committee members should be able to aford it, core devs are the last link in neo economics,
I removed a lot of artifacts, and old workflows and still without free space, I don't know where is gone this space...
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.
Nice job, I will review it.
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.
I was sending some examples but they won't be needed.
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.
@cschuchardt88, it looks very good!
What do you need to finish it?
fix up the xml files. |
- if: ${{ startsWith(matrix.runtime, 'win-x64') }} | ||
name: Get Distribution Caches (win-x64) | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./leveldb/build/Release/* | ||
key: leveldb-windows-x64 | ||
enableCrossOsArchive: true | ||
fail-on-cache-miss: true | ||
|
||
- if: ${{ startsWith(matrix.runtime, 'win-arm64') }} | ||
name: Get Distribution Caches (win-arm64) | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./leveldb/build/Release/* | ||
key: leveldb-windows-arm64 | ||
enableCrossOsArchive: true | ||
fail-on-cache-miss: true |
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.
Move key
to matrix parameter, exactly as in neo-project/neo-devpack-dotnet#855 (comment), and then two steps may be squashed. Cleaner code, no copy-pasting. The same optimisation can be applied to the instructions below.
@Jim8y @vncoelho @cschuchardt88 @AnnaShaleva @roman-khimov @shargon Maybe we can try this on v3.7.0? |
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.
Seems that need to be updated to net 8
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>
This can be put on hold until is completed. |
NOTE: You need to run this workflow manually when it time for release.
How this works
Build & Release (neo-cli)
workflow job.Run workflow
.🍭 That's all!!!! 🍭
What Will the Output Look Like?
Workflow process
Caches Created
Release Title
Release Body
Releases Downloads
Folder Content
Working as Standalone App
Closes #3005
Closes #3062