-
Notifications
You must be signed in to change notification settings - Fork 864
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
feat(ci): move to GitHub Actions #1657
Conversation
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
PSA: I am getting flashbacks of the usual MS Windows SNAFU. I am going to test doing windows build on Github Actions to see if its Appveyor-specific issue. Ref. https://github.com/samuelmeuli/action-electron-builder |
this is because CI added next will implicitly run `npm run build` before `electron-builder`, but it also makes sense for dev: if you want to run `npm start`, you don't need to wait for binaries to build. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
🕳️ 🐇 |
91e8077
to
5c811e9
Compare
💚 Good news: Github Action works fine, so we can drop Appveyor
Suspects to check:
|
22647e8
to
f1df31b
Compare
https://github.com/samuelmeuli/action-electron-builder#electron-builder-action License: MIT Signed-off-by: Marcin Rataj <[email protected]>
f1df31b
to
d57b997
Compare
Fixed Windows signingGood news: I've found and fixed the problem with signing. The problem was caused by clash of:
That is why signing Removing
Next: move everything to Github ActionNeed todouble check if While debugging the issue I've created Github Action setup (to confirm its Window issue, not AppVeyor), and it could also replace Travis for macOS and Linux, so I'm removing AppVeyor for building Windows binaries in this PR. @rafaelramalho19 @jessicaschilling I'll timebox it to one day to avoid 🕳️ 🐇, if this takes too much time, we can keep Travis for macOS and Linux, just to unblock the release. |
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
b48be80
to
53c56fa
Compare
electron and other tools download packages to cache directory, which make install step faster. we use npm ci which always recreates node_modules for more deterministic build. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
f3d434e
to
644f4e9
Compare
9cb57a3
to
23944c4
Compare
We also remove travis, as tests run fine on Github Action now License: MIT Signed-off-by: Marcin Rataj <[email protected]>
if something fails, we still want to see if other platforms are green License: MIT Signed-off-by: Marcin Rataj <[email protected]>
7f18803
to
98c0b5a
Compare
This tests how code will behave after PR is merged. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
9b79175
to
ca75159
Compare
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
ca75159
to
dcb71ac
Compare
Ok, this is ready for review. @rafaelramalho19 I migrated secrets and based on the lack of fireworks I believe CI correctly signs Windows and macOS binaries, but would like second set of eyes to confirm by dowloading
|
Downloaded from here, unzipped, got this |
@lidel seems to be working fine on Windows and looks signed (SHA1 and SHA256 with Protocol Labs as the signer). Perhaps unrelated to this PR there is a file |
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 must say I'm happy we can ditch Appveyor and Travis and put everything together in GitHub actions. Everything looks fine for me! Thanks @lidel
working-directory: ${{ github.workspace }} | ||
run: npm run test:e2e | ||
|
||
- name: Lint |
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.
Why lint so late? is deliberate? could go before build to fail fast on trivial errors?
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 think it may be just my personal preference: I find it more friendly to do linting later,
that way we see that contributed PR passes tests and only need linting fixes (which could be trivial), which makes it easier to evaluate contribution.
@@ -27,7 +27,7 @@ async function getPort () { | |||
// inside of `daemonReady`. To print them, pass DEBUG=true | |||
|
|||
describe('Application launch', function () { | |||
this.timeout(process.env.CI ? 180000 : 60000) | |||
this.timeout(60000) |
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! so fast we dont need th special case!
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.
it is so clear, i love 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.
.github/workflows/build.yml
Outdated
|
||
# TODO: run electron builder only on release tag? ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
- name: Build binaries with electron-builder | ||
uses: samuelmeuli/action-electron-builder@92327c67bc45ff7c38bf55d8aa8c4d75b7ea38e7 # v1.6.0 but safer than a tag that can be changed |
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.
Maybe we should keep that version on package.json under dev deps? Would make it easier to maintain in the future perhaps?
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.
This is the version of github action, internally it will use the version of electron-builder
we have in package.json
. I don't expect the action to be updated unless there is a breaking-change release of electron-builder
that we want to switch to.
ps. I've hardened setup and those third party actions are safelisted in https://github.com/ipfs-shipyard/ipfs-desktop/settings/actions, everything else is blocked. So even if someone sneaks different version in a PR, it won't work.
Thank you all for help with reviews and testing ✅ I'm going to merge this and start release dance, create release draft, but will wait with publishing Desktop release until Monday, because I'll be AFK this weekend and in my past life I've learned that shipping to production on Friday is not the best idea 🙈 It will also give us weekend and Monday to smoke-test final binaries.
@aschmahmann iiuc when published next to binaries it will be used by autoupdate mechanism for partial / differential updates, to shrink the update payload size. |
TLDR
The main value added here:
This PR
Workflow highlights
push
andpull_request
eventsdist...zip
archives)v0.13
) then artifacts are also uploaded and attached to release draft on GitHubpackage.json
,package-lock.json
andelectron-builder.yml
), which saves around a minute per jobcc #1263 #789