diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b16b7d77..712e4d63 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -30,6 +30,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.8.2 compilerKind: ghc compilerVersion: 9.8.2 @@ -216,13 +221,15 @@ jobs: ghc-options: -Werror=missing-methods -Werror=missing-fields EOF cat >> cabal.project <=4.12 && <4.20 + , base >=4.12 && <4.21 , binary ^>=0.8.6.0 , bytestring ^>=0.10.8.2 || ^>=0.11.1.0 || ^>=0.12.0.2 , Cabal-syntax ^>=3.12.0.0 - , containers ^>=0.6.0.1 + , containers ^>=0.6.0.1 || ^>=0.7 , deepseq ^>=1.4.2.0 || ^>=1.5.0.0 , directory ^>=1.3.0.0 - , filepath ^>=1.4.1.1 + , filepath ^>=1.4.1.1 || ^>=1.5.2.0 , parsec ^>=3.1.13.0 , pretty ^>=1.1.3.3 , text ^>=1.2.3.0 || ^>=2.0.1 || ^>=2.1 @@ -129,7 +131,7 @@ test-suite cabal-parsers-golden -- dependencies needing explicit constraints build-depends: - , ansi-terminal >=1.0 && <1.1 + , ansi-terminal >=1.0 && <1.2 , tasty ^>=1.4 || ^>=1.5 , tasty-golden ^>=2.3.1.1 , tree-diff >=0.2 && <0.4 diff --git a/cabal-install-parsers/src/Cabal/Config.hs b/cabal-install-parsers/src/Cabal/Config.hs index 8cf82171..08dc53eb 100644 --- a/cabal-install-parsers/src/Cabal/Config.hs +++ b/cabal-install-parsers/src/Cabal/Config.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} @@ -22,7 +23,6 @@ import Control.Exception (throwIO) import Data.ByteString (ByteString) import Data.Function ((&)) import Data.Functor.Identity (Identity (..)) -import Data.List (foldl') import Data.List.NonEmpty (NonEmpty) import Data.Map (Map) import Data.Maybe (fromMaybe) @@ -33,6 +33,10 @@ import System.Directory (getAppUserDataDirectory) import System.Environment (lookupEnv) import System.FilePath (()) +#if !MIN_VERSION_base(4,20,0) +import Data.Foldable (foldl') +#endif + import qualified Data.ByteString as BS import qualified Data.Map.Strict as M import qualified Distribution.CabalSpecVersion as C diff --git a/cabal-install-parsers/src/Cabal/Project.hs b/cabal-install-parsers/src/Cabal/Project.hs index 998ae853..d8e907f8 100644 --- a/cabal-install-parsers/src/Cabal/Project.hs +++ b/cabal-install-parsers/src/Cabal/Project.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} @@ -34,7 +35,7 @@ import Data.Either (partitionEithers) import Data.Foldable (toList) import Data.Function ((&)) import Data.Functor (void) -import Data.List (foldl', isSuffixOf) +import Data.List (isSuffixOf) import Data.List.NonEmpty (NonEmpty) import Data.Maybe (mapMaybe) import Data.Traversable (for) @@ -45,6 +46,10 @@ import Network.URI (URI (URI), parseURI) import System.Directory (doesDirectoryExist, doesFileExist) import System.FilePath (isAbsolute, normalise, splitDirectories, splitDrive, takeDirectory, ()) +#if !MIN_VERSION_base(4,20,0) +import Data.Foldable (foldl') +#endif + import qualified Data.ByteString as BS import qualified Data.Map.Strict as M import qualified Distribution.CabalSpecVersion as C diff --git a/cabal.project b/cabal.project index cf6029ae..2a757841 100644 --- a/cabal.project +++ b/cabal.project @@ -6,3 +6,5 @@ tests: True package haskell-ci ghc-options: -Wall ghc-options: -Werror + +allow-newer: ShellCheck:filepath diff --git a/fixtures/all-versions.github b/fixtures/all-versions.github index d46bc6dd..31f153c5 100644 --- a/fixtures/all-versions.github +++ b/fixtures/all-versions.github @@ -161,7 +161,7 @@ jobs: - compiler: ghc-9.0.1 compilerKind: ghc compilerVersion: 9.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 compilerKind: ghc @@ -181,107 +181,107 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: @@ -301,7 +301,7 @@ jobs: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" diff --git a/fixtures/copy-fields-all.github b/fixtures/copy-fields-all.github index cd7d6a87..9d75fe0e 100644 --- a/fixtures/copy-fields-all.github +++ b/fixtures/copy-fields-all.github @@ -46,129 +46,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -180,22 +170,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/copy-fields-none.github b/fixtures/copy-fields-none.github index a062a8e7..f96e15c6 100644 --- a/fixtures/copy-fields-none.github +++ b/fixtures/copy-fields-none.github @@ -46,129 +46,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -180,22 +170,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/copy-fields-some.github b/fixtures/copy-fields-some.github index ec648e62..7e0fff6b 100644 --- a/fixtures/copy-fields-some.github +++ b/fixtures/copy-fields-some.github @@ -46,129 +46,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -180,22 +170,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/doctest-version.github b/fixtures/doctest-version.github index a813155e..6fb7bb0f 100644 --- a/fixtures/doctest-version.github +++ b/fixtures/doctest-version.github @@ -161,7 +161,7 @@ jobs: - compiler: ghc-9.0.1 compilerKind: ghc compilerVersion: 9.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 compilerKind: ghc @@ -181,107 +181,107 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: @@ -301,7 +301,7 @@ jobs: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" @@ -398,7 +398,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c4398274 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-9ea05c43 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -417,7 +417,7 @@ jobs: uses: actions/cache/save@v4 if: always() with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c4398274 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-9ea05c43 path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 diff --git a/fixtures/doctest.github b/fixtures/doctest.github index de3fb2fd..66719152 100644 --- a/fixtures/doctest.github +++ b/fixtures/doctest.github @@ -161,7 +161,7 @@ jobs: - compiler: ghc-9.0.1 compilerKind: ghc compilerVersion: 9.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 compilerKind: ghc @@ -181,107 +181,107 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: @@ -301,7 +301,7 @@ jobs: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" @@ -398,7 +398,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-b0b3220d + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-ac1dc7e1 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -417,7 +417,7 @@ jobs: uses: actions/cache/save@v4 if: always() with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-b0b3220d + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-ac1dc7e1 path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 diff --git a/fixtures/empty-line.github b/fixtures/empty-line.github index b2dc087e..2c7b837e 100644 --- a/fixtures/empty-line.github +++ b/fixtures/empty-line.github @@ -46,131 +46,120 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; + "$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 }} @@ -182,22 +171,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/enabled-jobs.github b/fixtures/enabled-jobs.github index 44d033f3..09132f13 100644 --- a/fixtures/enabled-jobs.github +++ b/fixtures/enabled-jobs.github @@ -161,7 +161,7 @@ jobs: - compiler: ghc-9.0.1 compilerKind: ghc compilerVersion: 9.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 compilerKind: ghc @@ -181,107 +181,107 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: @@ -301,7 +301,7 @@ jobs: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" diff --git a/fixtures/fail-versions.github b/fixtures/fail-versions.github index e40e0818..e18bcf38 100644 --- a/fixtures/fail-versions.github +++ b/fixtures/fail-versions.github @@ -46,129 +46,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -180,22 +170,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/irc-channels.github b/fixtures/irc-channels.github index 37b2f967..ac96960c 100644 --- a/fixtures/irc-channels.github +++ b/fixtures/irc-channels.github @@ -73,129 +73,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -207,22 +197,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/messy.github b/fixtures/messy.github index b85a489f..1ebe862b 100644 --- a/fixtures/messy.github +++ b/fixtures/messy.github @@ -46,133 +46,122 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; - "$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) - apt-get update - apt-get install -y fftw3-dev - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" fftw3-dev - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.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.8.yaml; + "$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) + apt-get update + apt-get install -y fftw3-dev env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -184,22 +173,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/psql.github b/fixtures/psql.github index a48930ef..8d855c54 100644 --- a/fixtures/psql.github +++ b/fixtures/psql.github @@ -52,129 +52,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -186,22 +176,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/fixtures/travis-patch.github b/fixtures/travis-patch.github index e2cf9f49..beb9177d 100644 --- a/fixtures/travis-patch.github +++ b/fixtures/travis-patch.github @@ -46,129 +46,119 @@ jobs: - compiler: ghc-8.10.4 compilerKind: ghc compilerVersion: 8.10.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.3 compilerKind: ghc compilerVersion: 8.10.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.2 compilerKind: ghc compilerVersion: 8.10.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.10.1 compilerKind: ghc compilerVersion: 8.10.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.3 compilerKind: ghc compilerVersion: 8.8.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.2 compilerKind: ghc compilerVersion: 8.8.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.1 compilerKind: ghc compilerVersion: 8.8.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.4 compilerKind: ghc compilerVersion: 8.6.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.3 compilerKind: ghc compilerVersion: 8.6.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.2 compilerKind: ghc compilerVersion: 8.6.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.1 compilerKind: ghc compilerVersion: 8.6.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.3 compilerKind: ghc compilerVersion: 8.4.3 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.2 compilerKind: ghc compilerVersion: 8.4.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.1 compilerKind: ghc compilerVersion: 8.4.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$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) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$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 }} @@ -180,22 +170,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - 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" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + 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" 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" diff --git a/haskell-ci.cabal b/haskell-ci.cabal index 7dd18ac7..99ce9d10 100644 --- a/haskell-ci.cabal +++ b/haskell-ci.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: haskell-ci -version: 0.19.20240514 +version: 0.19.20240608 synopsis: Cabal package script generator for Travis-CI description: Script generator (@haskell-ci@) for @@ -41,6 +41,7 @@ tested-with: || ==9.4.8 || ==9.6.5 || ==9.8.2 + || ==9.10.1 extra-source-files: CHANGELOG.md extra-source-files: @@ -142,14 +143,14 @@ library haskell-ci-internal ViewPatterns build-depends: - , base >=4.12 && <4.20 + , base >=4.12 && <4.21 , binary ^>=0.8.5.1 , bytestring ^>=0.10.8.1 || ^>=0.11.1.0 || ^>=0.12.0.2 , Cabal-syntax ^>=3.12.0.0 - , containers ^>=0.6.0.1 + , containers ^>=0.6.0.1 || ^>=0.7 , deepseq ^>=1.4.2.0 || ^>=1.5.0.0 , directory ^>=1.3.0.0 - , filepath ^>=1.4.1.1 + , filepath ^>=1.4.1.1 || ^>=1.5.2.0 , mtl ^>=2.2.2 || ^>=2.3.1 , parsec ^>=3.1.13.0 , pretty ^>=1.1.3.3 @@ -161,7 +162,7 @@ library haskell-ci-internal build-depends: , aeson ^>=2.2.0.0 , attoparsec ^>=0.14.1 - , base-compat ^>=0.13.0 + , base-compat ^>=0.14.0 , base16-bytestring ^>=1.0.1.0 , cabal-install-parsers ^>=0.6.1.1 , cryptohash-sha256 ^>=0.11.101.0 @@ -211,7 +212,7 @@ test-suite golden -- dependencies needing explicit constraints build-depends: - , ansi-terminal >=1.0 && <1.1 + , ansi-terminal >=1.0 && <1.2 , Diff ^>=0.4.0 || ^>=0.5 , tasty ^>=1.4.1 || ^>=1.5 , tasty-golden ^>=2.3.1.1 diff --git a/haskell-ci.sh b/haskell-ci.sh index 93103402..70e3a572 100755 --- a/haskell-ci.sh +++ b/haskell-ci.sh @@ -19,7 +19,7 @@ fi CFG_CABAL_STORE_CACHE="" CFG_CABAL_REPO_CACHE="" -CFG_JOBS="9.8.2 9.6.5 9.4.8 9.2.8 9.0.2 8.10.7 8.8.4 8.6.5" +CFG_JOBS="9.10.1 9.8.2 9.6.5 9.4.8 9.2.8 9.0.2 8.10.7 8.8.4 8.6.5" CFG_CABAL_UPDATE=false SCRIPT_NAME=$(basename "$0") @@ -482,13 +482,15 @@ package * ghc-options: -Werror=missing-methods EOF cat >> cabal.project < error $ "Required fields: " ++ show xs - Right x -> x + Right x -> postprocessConfig x ------------------------------------------------------------------------------- -- Grammar @@ -249,7 +249,7 @@ parseConfigFile :: [C.Field C.Position] -> C.ParseResult Config parseConfigFile fields0 = do config <- C.parseFieldGrammar C.cabalSpecLatest fields configGrammar config' <- traverse parseSection $ concat sections - return $ postprocess $ foldl' (&) config config' + return $ postprocessConfig $ foldl' (&) config config' where (fields, sections) = C.partitionFields fields0 @@ -267,11 +267,11 @@ parseConfigFile fields0 = do C.parseWarning pos C.PWTUnknownSection $ "Unknown section " ++ fromUTF8BS name return id - postprocess :: Config -> Config - postprocess cfg - -- on yammy the only install option is ghcup - | cfgUbuntu cfg >= Jammy = cfg { cfgGhcupJobs = anyVersion } - | otherwise = cfg +postprocessConfig :: Config -> Config +postprocessConfig cfg + -- on yammy the only install option is ghcup + | cfgUbuntu cfg >= Jammy = cfg { cfgGhcupJobs = anyVersion } + | otherwise = cfg ------------------------------------------------------------------------------- -- Env diff --git a/src/HaskellCI/Prelude.hs b/src/HaskellCI/Prelude.hs index 053bd7e5..7d844aef 100644 --- a/src/HaskellCI/Prelude.hs +++ b/src/HaskellCI/Prelude.hs @@ -27,7 +27,7 @@ import Data.Foldable.WithIndex as X (ifoldr) import Data.Function as X (on) import Data.Functor.Compat as X ((<&>)) import Data.Functor.Identity as X (Identity (..)) -import Data.List as X (foldl', intercalate, isPrefixOf, nub, stripPrefix, tails) +import Data.List as X (intercalate, isPrefixOf, nub, stripPrefix, tails) import Data.List.NonEmpty as X (NonEmpty (..), groupBy) import Data.Maybe as X (fromMaybe, isJust, isNothing, listToMaybe, mapMaybe) import Data.Proxy as X (Proxy (..))