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

CI: Publish reports to Github Actions #3113

Merged
merged 18 commits into from
Feb 18, 2022
Merged

CI: Publish reports to Github Actions #3113

merged 18 commits into from
Feb 18, 2022

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Feb 17, 2022

This publishes our various reports to https://dfinity.github.io/motoko/. So far, only for master (github action doesn’t support PR deployments like netlify would).

@github-actions
Copy link

github-actions bot commented Feb 17, 2022

Comparing from 61883e8 to 054a46e:
The produced WebAssembly code seems to be completely unchanged.

@nomeata
Copy link
Collaborator Author

nomeata commented Feb 17, 2022

I thought maybe I can fix #2568 without waiting for anyone.

To boot, this PR creates a new derivation that combines all our “build reports” in one tree. This is a mild regression for what we had in hydra (there, you still could look at one report even though another might have failed), but probably ok.

Next I wanted to add a github action step that publishes that to a netlify page at https://motoko-builds.netlify.app/. But I stopped following that track because I need to be repo admin to configure secrets used by the build, but more importantly, it seems I use a netlify Personal Access Token which would give anyone with commit permissions on this repo the ability to control any of my netlify. So maybe netlify isn’t great either, at least not in this mode.

We could use Github Pages if we don’t mind a gh-pages branch polluting our repo. I’ll explore this once I can change the repo settings again.

@nomeata nomeata added the testing Related to test suite label Feb 17, 2022
@ggreif
Copy link
Contributor

ggreif commented Feb 18, 2022

Why not upload to an asset canister on the IC?

@nomeata
Copy link
Collaborator Author

nomeata commented Feb 18, 2022

Heh, interesting idea. And we'd get bragging rights if we start using the IC before it's used for the official dfinity.org web page :-)

Technically not too hard: create a key, load it up with a few ICPs, put it into the GitHub actions secrets (if small enough), write tool to upload a directory to an asset canister (script around dfx or dedicated tools or see if it exists; fleek maybe), upload after push and put URL into a PR comment or so.

Intuitively I'd use one canister per deploy, with very short freezing time, and leave it to canister depletion and deletion to clean up old canisters. But I fear our cost model (with I think 10¢ per canister installation) discourages such many-canister models.

So we could use a single such canister, and deal with rotating out old builds ourselves.

Or start maybe with just hosting latest master anyways.

@nomeata
Copy link
Collaborator Author

nomeata commented Feb 18, 2022

Ok, deploy to github action works:

Maybe start with this?

@nomeata nomeata marked this pull request as ready for review February 18, 2022 14:48
@nomeata nomeata changed the title CI: Publish reports to TODO CI: Publish reports to Github Actions Feb 18, 2022
Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

LGTM! Modulo the debug code... Some links give 404 errors, but we can check that later.

@nomeata nomeata merged commit 86baab6 into master Feb 18, 2022
@nomeata nomeata deleted the joachim/deploy-reports branch February 18, 2022 15:56
@nomeata nomeata mentioned this pull request May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants