Re #6531 Allow cross-OS use of release.hs
#6535
Merged
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.
This pull request folds the idea of #6533 into
etc/scripts/release.hs
itself, and extends it.Currently, the Linux/AArch64 job in
integration-tests.yml
makes use of:You can't use a Docker container on GitHub's macOS/M1-based
macos-14
, but the idea is that you could use on macOS/AArch64 locally:It also seeks to do the same with
release.hs check
, so that you can use on macOS/AArch64 locally:The pull request introduces
--stack-args
, as--docker-stack-exe
is a global flag, not astack build
flag. As before, when--alpine
is passed the global flags--docker
,--system-ghc
and--no-install-ghc
are specified.The pull request distinguishes the target OS from the platform OS. When
--alpine
is passed, the target OS is set toLinux
.In the case of
release.hs check
, the commands are run by the platform's Stack (withstack exec
) so that they can be run in a Docker container, if necessary. This is also done whenstack --version
is examined.With:
stack --docker --docker-stack-exe-image --system-ghc --no-install-ghc exec stack -- ...
the second Stack (the one provided by the Docker image) needs its own
--system-ghc --no-install-ghc
, so those flags are added togCheckStackArgs
when--alpine
is passed.The deprecated
putNormal
is replaced byputInfo
.This is being tested locally on a Mac mini/M1. The
4095-utf8-pure-nix
was failing because Nix can't be used in a Docker container. So, a guard has been added.One other test was failing:
4783-doctest-deps
. That is still being investigated and so this pull request is still draft.Please include the following checklist in your pull request:
Please also shortly describe how you tested your change. Bonus points for added tests! Local testing and also relying on CI.