From 51fb0ce233ea0ee830c27709f7223bcea3bbafa4 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 16 May 2024 20:26:15 +0100 Subject: [PATCH] CI attempt --- .github/workflows/haskell-ci.yml | 32 +++++++++++--------------------- configure.sh | 3 ++- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index fc615afc..f46a695f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20240501 +# version: 0.19.20240514 # -# REGENDATA ("0.19.20240501",["github","ghc-exactprint.cabal","--ghcup-jobs"]) +# REGENDATA ("0.19.20240514",["github","ghc-exactprint.cabal","--ghcup-jobs"]) # name: Haskell-CI on: @@ -43,8 +43,13 @@ jobs: curl -sL https://downloads.haskell.org/ghcup/0.1.22.0/x86_64-linux-ghcup-0.1.22.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml - "$HOME/.ghcup/bin/ghcup" install Cabal 3.11.0.0.2024.4.19 || (cat "$HOME"/.ghcup/logs/*.* && false) + # From https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504 + "$HOME/.ghcup/bin/ghcup" --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1848320/artifacts/raw/out/cabal-install-3.11.0.0-x86_64-linux-alpine3_12.tar.xz' 3.12.0.0-prerelease || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/cabal-3.12.0.0-prerelease" --version || true + cabal --version || true + # "$HOME/.ghcup/bin/ghcup" install cabal 3.11.0.0.2024.4.19 || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + # "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -62,12 +67,12 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.0.0-prerelease -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=true" >> "$GITHUB_ENV" + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: @@ -96,18 +101,6 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF - if $HEADHACKAGE; then - cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project cat >> cabal.project <> cabal.project - fi - $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-exactprint)$/; }' >> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-exactprint)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan diff --git a/configure.sh b/configure.sh index e3e0cf0b..368182d5 100755 --- a/configure.sh +++ b/configure.sh @@ -239,5 +239,6 @@ cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0 # cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.1/bin/ghc --allow-newer # Check final state -cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.10.1/bin/ghc +cabal configure -fdev --enable-tests --with-compiler=ghc-9.10.1 +# cabal configure -fdev --enable-tests --with-compiler=ghc-9.101 --allow-newer