Autobuild: Combine and simplify Mac build scripts#2514
Merged
ann0see merged 1 commit intojamulussoftware:masterfrom Mar 16, 2022
Merged
Autobuild: Combine and simplify Mac build scripts#2514ann0see merged 1 commit intojamulussoftware:masterfrom
ann0see merged 1 commit intojamulussoftware:masterfrom
Conversation
Related: jamulussoftware#2503 - Move all autobuild/mac/* scripts to a single .github/autobuild/mac.sh script which is called for the different stages (setup/build/get-artifacts). - Condense redundant parameter parsing into a single step - Create functions with proper names for larger steps - Inline Github artifact output definition as it's shorter that way - Make shellcheck-clean
hoffie
commented
Mar 16, 2022
Comment on lines
+118
to
+120
| cmd1_prebuild: "QT_VERSION=5.9.9 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh setup" | ||
| cmd2_build: "QT_VERSION=5.9.9 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh build" | ||
| cmd3_postbuild: "QT_VERSION=5.9.9 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh get-artifacts" |
Member
Author
There was a problem hiding this comment.
I chose to go with inline environment variables here.
For context:
- Windows uses PowerShell's argument parsing
- Linux doesn't require any parameters (yet)
So, the possibilities for Mac would be:
- Implement a argument parsing loop via
getoptsto (closely) match PowerShell (longer) - Set environment variables via workflow (downside: needs duplication in multiple places and needs consistent updates regarding cache key)
- Use positional arguments like we used to (downside: with the combination of all steps, we would already be using 3+1 arguments; it's getting harder to keep track of the proper order)
Among those, the most-readable and yet simplest implementation is the usage of inline environment variables.
I also thought about converting Windows/PowerShell to environment variables, but it seems that setting this inline is not as nice as on *nix.
22 tasks
pljones
approved these changes
Mar 16, 2022
softins
approved these changes
Mar 16, 2022
Member
softins
left a comment
There was a problem hiding this comment.
I did a comparison with the old scripts, which looked ok. CI green too, so approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of changes
Move all autobuild/mac/* scripts to a single .github/autobuild/mac.sh script which is called for the different stages (setup/build/get-artifacts).
Condense redundant parameter parsing into a single step
Create functions with proper names for larger steps
Inline Github artifact output definition as it's shorter that way
Make shellcheck-clean
CHANGELOG: Autobuild: Refactored and simplified Mac build scripts.
(will be condensed...)
Context: Fixes an issue?
Related: #2503
Does this change need documentation? What needs to be documented and how?
Status of this Pull Request
Ready for review.
What is missing until this pull request can be merged?
Checklist