Skip to content

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented May 21, 2021

What this PR does: This PR adds support for building arm64 binary when running make dist (for linux and macos), and also deb/rpm packages for linux/arm64 when running make packages; make test-packages.

Checklist

  • [na] Tests updated
  • [na] Documentation added
  • [na] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

pstibrany added 9 commits May 21, 2021 20:12
It doesn't work on GHA.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Excellent work! I tested the commands and just found a minor issue.

Makefile Outdated
sha256sum ./dist/cortex-$$os-$$arch | cut -d ' ' -f 1 > ./dist/cortex-$$os-$$arch-sha-256; \
echo "Building query-tee for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/query-tee-$$os-$$arch ./cmd/query-tee; \
sha256sum ./dist/query-tee-$$os-$$arch | cut -d ' ' -f 1 > ./dist/cortex-$$os-$$arch-sha-256; \
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sha256sum ./dist/query-tee-$$os-$$arch | cut -d ' ' -f 1 > ./dist/cortex-$$os-$$arch-sha-256; \
sha256sum ./dist/query-tee-$$os-$$arch | cut -d ' ' -f 1 > ./dist/query-tee-$$os-$$arch-sha-256; \

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, good catch! Thanks.

Signed-off-by: Peter Štibraný <[email protected]>
@pstibrany pstibrany merged commit 8b7ecff into cortexproject:master May 28, 2021
ac1214 pushed a commit to ac1214/cortex that referenced this pull request Jun 4, 2021
* Build arm64 binaries.

Signed-off-by: Peter Štibraný <[email protected]>

* Build also deb/rpm packages for arm64, and test them.

Signed-off-by: Peter Štibraný <[email protected]>

* Don't use --platform when building docker images.
It doesn't work on GHA.

Signed-off-by: Peter Štibraný <[email protected]>

* Fixes

Signed-off-by: Peter Štibraný <[email protected]>

* Fixes

Signed-off-by: Peter Štibraný <[email protected]>

* Fixes

Signed-off-by: Peter Štibraný <[email protected]>

* Remove tabs.

Signed-off-by: Peter Štibraný <[email protected]>

* Remove unused tags.

Signed-off-by: Peter Štibraný <[email protected]>

* Added comment.

Signed-off-by: Peter Štibraný <[email protected]>

* Don't build packages during all build.

Signed-off-by: Peter Štibraný <[email protected]>

* Remove unused PACKAGES var.

Signed-off-by: Peter Štibraný <[email protected]>

* Fix digest name.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Albert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants