diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index dd101b1c..c7441878 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -35,6 +35,11 @@ jobs: compilerVersion: 9.10.1 setup-method: ghcup allow-failure: false + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.8.2 compilerKind: ghc compilerVersion: 9.8.2 @@ -90,20 +95,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -132,21 +123,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d8d84b..ac05d9a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.20 + +- Add support for GHCup vanilla and prerelease channels (in a more principled way) + ## 0.18.1 - 2024-02-25 - Add GHC-9.8.2 diff --git a/cabal-install-parsers/cabal-install-parsers.cabal b/cabal-install-parsers/cabal-install-parsers.cabal index b626ef27..bf580145 100644 --- a/cabal-install-parsers/cabal-install-parsers.cabal +++ b/cabal-install-parsers/cabal-install-parsers.cabal @@ -33,6 +33,7 @@ tested-with: || ==9.4.8 || ==9.6.6 || ==9.8.2 + || ==9.8.3 || ==9.10.1 extra-source-files: diff --git a/fixtures/all-versions.github b/fixtures/all-versions.github index 9a4a6f44..7647621e 100644 --- a/fixtures/all-versions.github +++ b/fixtures/all-versions.github @@ -313,20 +313,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | diff --git a/fixtures/copy-fields-all.github b/fixtures/copy-fields-all.github index ae39e6ca..4492207a 100644 --- a/fixtures/copy-fields-all.github +++ b/fixtures/copy-fields-all.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,35 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/copy-fields-none.github b/fixtures/copy-fields-none.github index a2f3e525..ee6bc293 100644 --- a/fixtures/copy-fields-none.github +++ b/fixtures/copy-fields-none.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,35 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/copy-fields-some.github b/fixtures/copy-fields-some.github index f08d456a..389b4438 100644 --- a/fixtures/copy-fields-some.github +++ b/fixtures/copy-fields-some.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,35 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/doctest-version.github b/fixtures/doctest-version.github index b0a6648e..f891275f 100644 --- a/fixtures/doctest-version.github +++ b/fixtures/doctest-version.github @@ -313,20 +313,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | diff --git a/fixtures/doctest.github b/fixtures/doctest.github index 0a21cdec..0f86336c 100644 --- a/fixtures/doctest.github +++ b/fixtures/doctest.github @@ -313,20 +313,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | diff --git a/fixtures/empty-line.github b/fixtures/empty-line.github index c51eabbe..9ec20f2d 100644 --- a/fixtures/empty-line.github +++ b/fixtures/empty-line.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,20 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup prerelease) if: matrix.setup-method == 'ghcup-prerelease' run: | diff --git a/fixtures/enabled-jobs.github b/fixtures/enabled-jobs.github index 2c47bd0c..ff823ac5 100644 --- a/fixtures/enabled-jobs.github +++ b/fixtures/enabled-jobs.github @@ -313,20 +313,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | diff --git a/fixtures/fail-versions.github b/fixtures/fail-versions.github index cb4277d2..f25586a7 100644 --- a/fixtures/fail-versions.github +++ b/fixtures/fail-versions.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,35 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/irc-channels.github b/fixtures/irc-channels.github index 7ba35fea..3845f126 100644 --- a/fixtures/irc-channels.github +++ b/fixtures/irc-channels.github @@ -190,20 +190,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -218,35 +204,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/messy.github b/fixtures/messy.github index c855a628..c6505f62 100644 --- a/fixtures/messy.github +++ b/fixtures/messy.github @@ -164,20 +164,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -192,20 +178,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup prerelease) if: matrix.setup-method == 'ghcup-prerelease' run: | diff --git a/fixtures/psql.github b/fixtures/psql.github index 5ffa3b46..58b7e938 100644 --- a/fixtures/psql.github +++ b/fixtures/psql.github @@ -169,20 +169,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -197,35 +183,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/fixtures/travis-patch.github b/fixtures/travis-patch.github index 491fc7c8..e5f0845f 100644 --- a/fixtures/travis-patch.github +++ b/fixtures/travis-patch.github @@ -163,20 +163,6 @@ jobs: run: | "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (hvr-ppa) - if: matrix.setup-method == 'hvr-ppa' - run: | - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -191,35 +177,6 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup vanilla) - if: matrix.setup-method == 'ghcup-vanilla' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Install GHC (GHCup prerelease) - if: matrix.setup-method == 'ghcup-prerelease' - run: | - "$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) - 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" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH diff --git a/haskell-ci.cabal b/haskell-ci.cabal index fd7c480a..e9396dcc 100644 --- a/haskell-ci.cabal +++ b/haskell-ci.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: haskell-ci -version: 0.19.20241109 +version: 0.19.20241111 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.6 || ==9.8.2 + || ==9.8.3 || ==9.10.1 extra-source-files: CHANGELOG.md diff --git a/haskell-ci.sh b/haskell-ci.sh index 1eccd9de..99ad1259 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.10.1 9.8.2 9.6.6 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.3 9.8.2 9.6.6 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") diff --git a/src/HaskellCI/Compiler.hs b/src/HaskellCI/Compiler.hs index 2d0e6ddf..9c3e0ad4 100644 --- a/src/HaskellCI/Compiler.hs +++ b/src/HaskellCI/Compiler.hs @@ -16,7 +16,9 @@ module HaskellCI.Compiler ( -- * Compiler version range CompilerRange (..), compilerWithinRange, + compilerWithinGhcRange, invertCompilerRange, + invertVersionRange, -- * Known versions knownGhcVersions, knownGhcjsVersions, @@ -113,6 +115,9 @@ compilerWithinRange GHCHead RangeGHCJS = False compilerWithinRange (GHCJS _) RangeGHCJS = True compilerWithinRange v (RangePoints vs) = S.member v vs +compilerWithinGhcRange :: CompilerVersion -> VersionRange -> Bool +compilerWithinGhcRange v vr = compilerWithinRange v (RangeGHC /\ Range vr) + invertCompilerRange :: CompilerRange -> CompilerRange invertCompilerRange (Range vr) = Range (invertVersionRange vr) invertCompilerRange RangeGHC = RangeGHCJS diff --git a/src/HaskellCI/Config/History.hs b/src/HaskellCI/Config/History.hs index c71efbff..79a9bce8 100644 --- a/src/HaskellCI/Config/History.hs +++ b/src/HaskellCI/Config/History.hs @@ -1,6 +1,9 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeApplications #-} -module HaskellCI.Config.History where +module HaskellCI.Config.History ( + configHistory, + defaultConfig, +) where import HaskellCI.Prelude @@ -10,6 +13,13 @@ import HaskellCI.Config.Initial import HaskellCI.Config.Type import HaskellCI.Config.Ubuntu +import HaskellCI.Compiler (invertVersionRange) + +ghcupNormalRange :: VersionRange +ghcupNormalRange = C.unionVersionRanges + (C.intersectVersionRanges (C.laterVersion (mkVersion [8,10,4])) (C.earlierVersion (mkVersion [9]))) + (C.laterVersion (mkVersion [9,0,1])) + configHistory :: [([Int], Config -> Config)] configHistory = [ ver 0 19 20240414 := \cfg -> cfg @@ -25,6 +35,9 @@ configHistory = & field @"cfgDocspec" . field @"cfgDocspecHash" .~ "48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76" , ver 0 19 20240708 := \cfg -> cfg & field @"cfgGhcupVersion" .~ C.mkVersion [0,1,30,0] + , ver 0 19 20241111 := \cfg -> cfg + & field @"cfgGhcupJobs" .~ C.intersectVersionRanges ghcupNormalRange (invertVersionRange (C.withinVersion (C.mkVersion [9,8,3]))) + & field @"cfgGhcupVanillaJobs" .~ C.withinVersion (C.mkVersion [9,8,3]) ] where ver x y z = [x, y, z] diff --git a/src/HaskellCI/GitHub.hs b/src/HaskellCI/GitHub.hs index 08585486..27d553dc 100644 --- a/src/HaskellCI/GitHub.hs +++ b/src/HaskellCI/GitHub.hs @@ -150,7 +150,10 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do tell_env "CABAL" $ "$HOME/.ghcup/bin/cabal-" ++ cabalFullVer ++ " -vnormal+nowrap" -- todo: when any job uses hvr-ppa - githubRunIf' "Install GHC (hvr-ppa)" "matrix.setup-method == 'hvr-ppa'" envEnv $ do + let whenWithinGhcRange :: Applicative f => VersionRange -> f () -> f () + whenWithinGhcRange vr m = when (any (`compilerWithinGhcRange` vr) allVersions) m + + whenWithinGhcRange cfgHvrPpaJobs $ githubRunIf' "Install GHC (hvr-ppa)" "matrix.setup-method == 'hvr-ppa'" envEnv $ do sh "apt-add-repository -y 'ppa:hvr/ghc'" sh "apt-get update" sh $ "apt-get install -y \"$HCNAME\"" @@ -169,16 +172,15 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do tell_env "HCPKG" "$HCPKG" tell_env "HADDOCK" "$HADDOCK" - -- todo: when any job uses ghcup - githubRunIf' "Install GHC (GHCup)" "matrix.setup-method == 'ghcup'" envEnv $ do + whenWithinGhcRange cfgGhcupJobs $ githubRunIf' "Install GHC (GHCup)" "matrix.setup-method == 'ghcup'" envEnv $ do sh $ "\"$HOME/.ghcup/bin/ghcup\" install ghc \"$HCVER\" || (cat \"$HOME\"/.ghcup/logs/*.* && false)" ghcupGhcEnv - githubRunIf' "Install GHC (GHCup vanilla)" "matrix.setup-method == 'ghcup-vanilla'" envEnv $ do + whenWithinGhcRange cfgGhcupVanillaJobs $ githubRunIf' "Install GHC (GHCup vanilla)" "matrix.setup-method == 'ghcup-vanilla'" envEnv $ do sh $ "\"$HOME/.ghcup/bin/ghcup\" install ghc \"$HCVER\" || (cat \"$HOME\"/.ghcup/logs/*.* && false)" ghcupGhcEnv - githubRunIf' "Install GHC (GHCup prerelease)" "matrix.setup-method == 'ghcup-prerelease'" envEnv $ do + whenWithinGhcRange cfgGhcupPrereleaseJobs $ githubRunIf' "Install GHC (GHCup prerelease)" "matrix.setup-method == 'ghcup-prerelease'" envEnv $ do sh "\"$HOME/.ghcup/bin/ghcup\" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;" sh $ "\"$HOME/.ghcup/bin/ghcup\" install ghc \"$HCVER\" || (cat \"$HOME\"/.ghcup/logs/*.* && false)" ghcupGhcEnv