Skip to content

feat: add goreleaser - #334

Merged
general-kroll-4-life merged 2 commits into
stackql:mainfrom
Iqbalabdi:main
Dec 4, 2023
Merged

general-kroll-4-life merged 2 commits into
stackql:mainfrom
Iqbalabdi:main

Conversation

@Iqbalabdi

Copy link
Copy Markdown
Contributor

Description

Added Goreleaser

  • This build uses three different files (each for a different platform) because, as mentioned in this comment, StackQL needs to enable CGO. To avoid issues with cross-compiling and CGO, the binary needs to be built with different compilers (CC and CXX) for each platform.
  • Utilizes goreleaser-action in build.yaml to build the binary.
  • Triggered by the tags event and hasn't affected the main workflows.

Goreleaser build includes:

  • Windows AMD64
  • Darwin universal binary ARM64 and AMD64
  • Linux AMD64 and ARM64
  • Linux packages .deb, .rpm, .apk, and Archlinux packages

Excluded:

  • Docker images
  • Chocolatey Windows packages

The reason for exclusions:

  • For Docker images, Goreleaser encounters difficulties accessing environment variables from the host/runner (refer to this issue). To use env, it should be executed like this. However, since this build uses goreleaser-action, the run cannot be executed.
  • Consistently encountering errors when attempting to build for Chocolatey, coupled with a lack of sufficient documentation.

Type of Change

  • Bug fix (non-breaking change to fix a bug).
  • Feature (non-breaking change to add functionality).
  • Breaking change.
  • Other (Workflows change).

Issues Referenced

[Feat] Issue: #224

Evidence

image
image

See more on this release.

Checklist:

  • A full round of testing has been completed, and there are no test failures as a result of these changes.
  • The changes are covered with functional and/or integration robot testing.
  • The changes work on all supported platforms.
  • Unit tests pass locally, as per the developer guide.
  • Robot tests pass locally, as per the developer guide.
  • Linter passes locally, as per the developer guide.

Variations

  • As mentioned before, this build uses goreleaser-action, so the ldflags for the binary use field templates from Goreleaser, not using environment variables from runner/host.

Tech Debt

  • Incorporate a testing workflow before executing Goreleaser.

- Add config for linux release
- Add config for darwin release
- Add config for windows release
- Add build workflows
@Iqbalabdi
Iqbalabdi marked this pull request as ready for review November 27, 2023 12:51
@general-kroll-4-life

Copy link
Copy Markdown
Contributor

@Iqbalabdi thank you for submitting. Shall review this; will probably take a while

@general-kroll-4-life general-kroll-4-life left a comment

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.

@Iqbalabdi nice work! General observation is that we want to perform (i) unit tests, (ii) robot tests on all goreleaser-generated artifacts. This we can do in future Pull Requests. Please address the one requested change for now that should be fine. Thanks again, not least for being patient.

Comment thread .github/workflows/build.yaml Outdated
- change tags title from v* to testing-v*
@Iqbalabdi

Copy link
Copy Markdown
Contributor Author

done. please review

@general-kroll-4-life
general-kroll-4-life merged commit 3d41a76 into stackql:main Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants