-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(ci): armv7 cross builds #3892
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "rpm": { | ||
| "armv7l": "armhfp" | ||
| }, | ||
| "deb": { | ||
| "armv7l": "armhf" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,14 +43,27 @@ release_gcp() { | |
| cp "./release-packages/$release_name.tar.gz" "./release-gcp/latest/$OS-$ARCH.tar.gz" | ||
| } | ||
|
|
||
| get_nfpm_arch() { | ||
| if jq -re ".${PKG_FORMAT}.${ARCH}" ./ci/build/arch-override.json > /dev/null; then | ||
| jq -re ".${PKG_FORMAT}.${ARCH}" ./ci/build/arch-override.json | ||
| else | ||
| echo "$ARCH" | ||
| fi | ||
| } | ||
|
|
||
|
Comment on lines
+50
to
+57
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could add a comment above explaining why we have to override the arch? Or why we have this function?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure! I can do that - just give me a minute.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only request then is to add a comment or two explaining why we have to override the arch and then we should approve and merge!
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
| # Generates deb and rpm packages. | ||
| release_nfpm() { | ||
| local nfpm_config | ||
|
|
||
| PKG_FORMAT="deb" | ||
| NFPM_ARCH="$(get_nfpm_arch)" | ||
| nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)" | ||
| nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_${NFPM_ARCH}.deb" | ||
|
|
||
| # The underscores are convention for .deb. | ||
| nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_$ARCH.deb" | ||
| nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server-$VERSION-$ARCH.rpm" | ||
| PKG_FORMAT="rpm" | ||
| NFPM_ARCH="$(get_nfpm_arch)" | ||
| nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)" | ||
| nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server-$VERSION-$NFPM_ARCH.rpm" | ||
| } | ||
|
|
||
| main "$@" | ||
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 worry about adding an extra file just because it seems like more to maintain. Also the json means we can't really put comments to explain why we have this. Any thoughts on writing a function to pass in
rpmordeband then returning values instead?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.
My reasoning to put this in a separate file is that its easier to add overrides for other architectures should we need it in the future (say powerpc/s390x) and that it also separates code (building packages) from data (what overrides to apply when)
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.
Ah, okay that makes sense then :) Let's leave as is!