Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

WIP: workflows for building binaries#135

Closed
robertsLando wants to merge 21 commits into
masterfrom
workflows
Closed

WIP: workflows for building binaries#135
robertsLando wants to merge 21 commits into
masterfrom
workflows

Conversation

@robertsLando

@robertsLando robertsLando commented Mar 26, 2021

Copy link
Copy Markdown
Contributor

This PR adds required workflows to build binaries. As a starting point I have took the workflows from @jesec fork https://github.com/jesec/pkg-fetch then I have edited the upload script to take only node latest 3 lts versions found in patches.

Fixes #124
Fixes #137

@robertsLando

Copy link
Copy Markdown
Contributor Author

@jesec I would like to know your opinion here

@robertsLando

Copy link
Copy Markdown
Contributor Author

I also found a typo here: https://github.com/jesec/pkg-fetch/blob/master/.github/workflows/build-publish.yml#L125 amd64 shoudl be arm64` I think

@robertsLando

robertsLando commented Mar 26, 2021

Copy link
Copy Markdown
Contributor Author

@robertsLando

Copy link
Copy Markdown
Contributor Author

Comment thread lib/upload.js Outdated
Comment thread lib/upload.js Outdated
Comment thread license.md Outdated
Comment thread docker/Dockerfile.linux
@@ -0,0 +1,13 @@
FROM node:buster

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that the binaries are not going to work with any distro older than Debian Buster.

Per previous discussions, use RHEL toolchain instead unless you have a better idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have no experience in this, could you fix it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Next week, as I said.

Comment thread .vscode/settings.json Outdated
TARGET_TOOLCHAIN_ARCH=aarch64
TARGET_NODE_ARCH=arm64
file: ./docker/Dockerfile.linuxstatic
platforms: linux/arm64

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a cross toolchain. Don’t emulate arm64. Use x86-64 for toolchain.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have no experience in this, could you fix it?

Comment thread license.md Outdated
@jesec

jesec commented Mar 27, 2021

Copy link
Copy Markdown
Contributor

@jesec Seems the linux static are throwing errors see

https://github.com/robertsLando/pkg-fetch/runs/2202409337?check_suite_focus=true
https://github.com/robertsLando/pkg-fetch/runs/2202409418?check_suite_focus=true

Missing npm run prepare or npm run babel, I assume. The issue does not happen in my repo, so probably some changes are missed.

@robertsLando

robertsLando commented Mar 29, 2021

Copy link
Copy Markdown
Contributor Author

@jesec IMO we should also pass github credentials down to dockerfiles in order to allow workflow to send binaries as soon as possible after they finish the build instead of using the upload artifacts action

@jesec

jesec commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

@jesec IMO we should also pass github credentials down to dockerfiles in order to allow workflow to send binaries as soon as possible after they finish the build instead of using the upload artifacts action

No. IMO we should remove the upload functions from the (JS-side) codes, and implement the functions in the workflows.

Additionally, we may want to upload the binaries manually, to sync with the release.

@robertsLando

Copy link
Copy Markdown
Contributor Author

The problem is that expecially when building with docker you could build just 1 binary before the 6 hours limit is reached and the job cancelled, you could build 2 and for the other one have no binaries uploaded... Otherwise we should use a matrix to build just one nodejs version for time

@jesec

jesec commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

The problem is that expecially when building with docker you could build just 1 binary before the 6 hours limit is reached and the job cancelled, you could build 2 and for the other one have no binaries uploaded... Otherwise we should use a matrix to build just one nodejs version for time

Each Docker run builds one binary only. Each job executes one Docker run only.

@robertsLando

robertsLando commented Mar 29, 2021

Copy link
Copy Markdown
Contributor Author

ATM the upload script builds all available patches that's why I was asking. In this case we could make the node version a workflow input and we could create a workflow dispatcher that triggers this workflow for each node version found in patches using this: https://github.com/marketplace/actions/workflow-dispatch

@jesec

jesec commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

ATM the upload script builds all available patches that's why I was asking. In this case we could make the node version a workflow input and we could create a workflow dispatcher that triggers this workflow for each node version found in patches using this: https://github.com/marketplace/actions/workflow-dispatch

Host Node.js version is unrelated. We would have to add a function to allow building for specific Node version only.

@robertsLando

Copy link
Copy Markdown
Contributor Author

I know that, I thought we could get the version from the process version in that way. BTW we also could pass it as an env var

@jesec

jesec commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

Closed in favor of #153.

@jesec jesec closed this Apr 2, 2021
@leerob
leerob deleted the workflows branch April 2, 2021 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary not found CI, base (binary compatibility), multi-arch discussions

3 participants