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

flatpak: Add workflow #4151

Merged
merged 1 commit into from
Aug 17, 2023
Merged

Conversation

BigmenPixel0
Copy link
Contributor

A new release will trigger the workflow. It builds the flatpak package in 3 parts (because of slow QEMU), prints hashes and pushes to Flathub via the secret token.

@selsta
Copy link
Collaborator

selsta commented Apr 16, 2023

Have you thought about using upload-artifact / download-artifact instead of the cache to pass data between the jobs?

https://github.com/actions/upload-artifact
https://github.com/actions/download-artifact

At the end you can also use

https://github.com/marketplace/actions/delete-artifact

to delete the temporary data. My worry with using a cache is that other jobs might delete data in between the steps due to the 10GB limit.

https://github.com/monero-project/monero-gui/actions/caches

@BigmenPixel0
Copy link
Contributor Author

Have you thought about using upload-artifact / download-artifact instead of the cache to pass data between the jobs?

Oh, that would be much better!

@BigmenPixel0
Copy link
Contributor Author

There is a problem with uploading an artifact.
This is the bug.

@selsta
Copy link
Collaborator

selsta commented Apr 17, 2023

What if you .tar the dir manually before uploading the .tar?

https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files

@selsta
Copy link
Collaborator

selsta commented Apr 17, 2023

tar -cvf flatpak-builder.tar .flatpak-builder

...

    - name: Save flatpak-builder
      uses: actions/upload-artifact@v3
      with:
        name: flatpak-builder-${{ matrix.arch }}
        path: flatpak-builder.tar
    - name: Restore flatpak-builder
      uses: actions/download-artifact@v3
      with:
        name: flatpak-builder-${{ matrix.arch }}
        path: flatpak-builder.tar

...

tar -xvf flatpak-builder.tar

@BigmenPixel0
Copy link
Contributor Author

x86_64 flatpak-builder.tar was uploaded succesfully, so now I'm waiting for X hours. :)

@selsta
Copy link
Collaborator

selsta commented Apr 17, 2023

It seems alternatively you could also manually delete the socket file: https://github.com/input-output-hk/cardano-node/pull/2012/files

<url type="contribute">https://getmonero.org/get-started/contributing</url>

<releases>
<release version="0.18.2.2" date="2023-04-10"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to be changed in advanced? Sometimes we don't know the exact release date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to be changed in advanced?

Yes.

Sometimes we don't know the exact release date.

Even, for example, the day before the release or the day? I could create a PR that will be accepted before release, or the problem still is not solved so?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In OBS it's done interesting.

Copy link
Collaborator

@selsta selsta Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this can be changed after the release tag is set? Or can it be automatically set by a script before the workflow is running?

I'll think about it more.

Also seems OBS doesn't have any historical releases. Are they necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this can be changed after the release tag is set? Or can it be automatically set by a script before the workflow is running?

It will be need to add some CMake files, so it won't be need to change the appdata file every release.

Also seems OBS doesn't have any historical releases. Are they necessary?

Desirable, but not required.

@BigmenPixel0
Copy link
Contributor Author

For now there are 2 problems: metainfo updating and CI checks before flatpak building (or wait for a new release of flat-manager or make it manually).

@selsta
Copy link
Collaborator

selsta commented May 1, 2023

CI checks before flatpak building (or wait for a new release of flat-manager or make it manually).

Can you expand on this? I would like to wait with the build process until a new release is set here: https://github.com/monero-project/monero-gui/releases

We don't want that every tag gets pushed since sometimes we have tags that are buggy or miss something.

@BigmenPixel0
Copy link
Contributor Author

BigmenPixel0 commented May 2, 2023

CI checks before flatpak building (or wait for a new release of flat-manager or make it manually).

Can you expand on this?

These are appdata and manifest checkers.

@BigmenPixel0 BigmenPixel0 force-pushed the add-flatpak branch 3 times, most recently from 93f44be to 7a737fb Compare May 9, 2023 11:02
@BigmenPixel0
Copy link
Contributor Author

It will push to the beta branch because we should test the beta token.

@BigmenPixel0
Copy link
Contributor Author

BigmenPixel0 commented Jul 23, 2023

I changed the token FLATHUB_TOKEN_BETA to FLATHUB_ because exactly FLATHUB_ has been added to the secrets. :)
That's only beta token which will be changed to the stable.


on:
release:
types: push
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documented somewhere? I don't see push here, but maybe I'm looking at the wrong place or missing something.

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're right. That's a beta token which pushes to the beta repo. I wanted it to push every commit (temporary).

on:
  push

Is it correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now resolved?

Copy link
Collaborator

@selsta selsta Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this will need planning. I don't want to run a multi-hour long CI on each commit after this is merged. So this has to be merged, then one test commit is run and then reverted.

Copy link
Contributor Author

@BigmenPixel0 BigmenPixel0 Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so is it better to push before other prs now or at the final after (to not create a lot of workflows)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to merge this last.

@adrelanos
Copy link

flathub has a verified blue checkmark similar to Twitter. It shows that a flathub project is official and not by random third-party. Please consider applying for it.

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be tested now.

@luigi1111 luigi1111 merged commit 705cc65 into monero-project:master Aug 17, 2023
7 of 8 checks passed
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.

4 participants