Skip to content

Backport #10650: add ghc 9.12.1 to sdist check list #10865

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/check-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# release of a corresponding Cabal and friends. it can also be short since it's
# highly unlikely that we are releasing really old branches.
ghc:
["9.10.1", "9.8.1", "9.6.1"]
["9.12.1", "9.10.1", "9.8.1", "9.6.1"]

steps:

Expand All @@ -42,8 +42,9 @@ jobs:

- uses: actions/checkout@v4

- name: Make sdist
run: cabal sdist cabal-install
- name: Make sdists
run: |
cabal sdist Cabal-syntax Cabal Cabal-hooks cabal-install-solver cabal-install

- name: Install from sdist
run: |
Expand All @@ -58,10 +59,26 @@ jobs:
# dunno if this will ever be extended to freebsd, but grep -q is a gnu-ism
if ghc-pkg --global --simple-output list Cabal | grep "^Cabal-$ver\\." >/dev/null; then
# sigh, someone broke installing from tarballs
rm -rf cabal*.project Cabal Cabal-syntax cabal-install-solver cabal-install
rm -rf cabal*.project Cabal-syntax Cabal Cabal-hooks cabal-install-solver cabal-install
tar xfz "$sdist"
cd "cabal-install-$cbl"*
cabal install
cd "cabal-install-"*
# note: we have all the sdists in a `package-env` because sometimes we need
# to allow newer versions of Cabal (for example, we're using something that
# was added to Cabal, which isn't a PVP violation as long as the old API is
# still there). This _shouldn't_ affect how the solver picks versions, so it
# should be safe.
here="$(pwd)"
for pkg in Cabal-syntax Cabal Cabal-hooks cabal-install-solver; do
# need ver suffix here so e.g. Cabal-* doesn't match Cabal-syntax-*
echo "Building $pkg-$ver"
tar xfz "$here/../dist-newstyle/sdist/$pkg-$ver"*".tar.gz"
(cd "$pkg-$ver"*; cabal install --lib --package-env="$here")
done
echo "Sanity check"
ls -l "$here/.ghc"*
cat "$here/.ghc"*
echo "Building cabal-install-$ver"
cabal install --package-env="$here"
else
echo No matching bootlib Cabal version to test against.
exit 0
Expand Down
Loading