Skip to content

Commit

Permalink
try to run check-sdist on the right ghcs
Browse files Browse the repository at this point in the history
(cherry picked from commit 6a2b5a7)
  • Loading branch information
geekosaur committed Oct 26, 2024
1 parent 39b1d2c commit 186df7f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/check-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,17 @@ jobs:
# No caching, since the point is to verify they can be installed "from scratch"
# Don't run on master or a PR targeting master, because there's never an installable Cabal
dogfood-sdists:
name: Dogfood sdist on ${{ matrix.os }} ghc-${{ matrix.ghc }}
name: Dogfood sdist on ghc-${{ matrix.ghc }}
if: github.ref != 'refs/heads/master' && github.base_ref != 'master'
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
# this should be kept up to date with the list in validate.yml, but should be the
# *first* compiler release so we validate against what is hopefully the first
# 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.4.1",
]
["9.10.1", "9.8.1", "9.6.1"]

steps:

Expand All @@ -78,8 +72,9 @@ jobs:
sdist="$(ls dist-newstyle/sdist/cabal-install-*.tar.gz | sed -n '\,^dist-newstyle/sdist/cabal-install-[0-9.]*\.tar\.gz$,{;p;q;}')"
# extract the cabal-install major version
ver="$(echo "$sdist" | sed -n 's,^dist-newstyle/sdist/cabal-install-\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9.]*$,\1,p')"
echo "$ver"
# 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-$cbl\\." >/dev/null; then
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
tar xfz "$sdist"
Expand Down

0 comments on commit 186df7f

Please sign in to comment.