diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 9632d1e4..b0033e20 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -35,11 +35,6 @@ 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.3 compilerKind: ghc compilerVersion: 9.8.3 @@ -186,7 +181,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-40979e07 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-1e9b3b69 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -214,7 +209,7 @@ jobs: if: always() uses: actions/cache/save@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-40979e07 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-1e9b3b69 path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 diff --git a/fixtures/all-versions.github b/fixtures/all-versions.github index bc92b653..a97587fd 100644 --- a/fixtures/all-versions.github +++ b/fixtures/all-versions.github @@ -28,11 +28,6 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.0.20241031 - compilerKind: ghc - compilerVersion: 9.12.0.20241031 - setup-method: ghcup - allow-failure: false - compiler: ghc-9.12.0.20241031 compilerKind: ghc compilerVersion: 9.12.0.20241031 @@ -43,11 +38,6 @@ 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.3 compilerKind: ghc compilerVersion: 9.8.3 @@ -288,41 +278,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -338,20 +308,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 65561fcb..4492207a 100644 --- a/fixtures/copy-fields-all.github +++ b/fixtures/copy-fields-all.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/fixtures/copy-fields-none.github b/fixtures/copy-fields-none.github index eaf623d0..ee6bc293 100644 --- a/fixtures/copy-fields-none.github +++ b/fixtures/copy-fields-none.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/fixtures/copy-fields-some.github b/fixtures/copy-fields-some.github index 7d09cd29..389b4438 100644 --- a/fixtures/copy-fields-some.github +++ b/fixtures/copy-fields-some.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/fixtures/doctest-version.github b/fixtures/doctest-version.github index 823871f5..af753ce9 100644 --- a/fixtures/doctest-version.github +++ b/fixtures/doctest-version.github @@ -28,11 +28,6 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.0.20241031 - compilerKind: ghc - compilerVersion: 9.12.0.20241031 - setup-method: ghcup - allow-failure: false - compiler: ghc-9.12.0.20241031 compilerKind: ghc compilerVersion: 9.12.0.20241031 @@ -43,11 +38,6 @@ 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.3 compilerKind: ghc compilerVersion: 9.8.3 @@ -288,41 +278,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -338,20 +308,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: | @@ -461,7 +417,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c489907f + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-af17a32a path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -480,7 +436,7 @@ jobs: if: always() uses: actions/cache/save@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c489907f + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-af17a32a path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 diff --git a/fixtures/doctest.github b/fixtures/doctest.github index 5b3f775a..bde1dd81 100644 --- a/fixtures/doctest.github +++ b/fixtures/doctest.github @@ -28,11 +28,6 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.0.20241031 - compilerKind: ghc - compilerVersion: 9.12.0.20241031 - setup-method: ghcup - allow-failure: false - compiler: ghc-9.12.0.20241031 compilerKind: ghc compilerVersion: 9.12.0.20241031 @@ -43,11 +38,6 @@ 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.3 compilerKind: ghc compilerVersion: 9.8.3 @@ -288,41 +278,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -338,20 +308,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: | @@ -461,7 +417,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-150239ac + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-761cb1ae path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -480,7 +436,7 @@ jobs: if: always() uses: actions/cache/save@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-150239ac + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-761cb1ae path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 diff --git a/fixtures/empty-line.github b/fixtures/empty-line.github index 9db44ab2..9ec20f2d 100644 --- a/fixtures/empty-line.github +++ b/fixtures/empty-line.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/fixtures/enabled-jobs.github b/fixtures/enabled-jobs.github index 254c5efd..07da5776 100644 --- a/fixtures/enabled-jobs.github +++ b/fixtures/enabled-jobs.github @@ -28,11 +28,6 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.0.20241031 - compilerKind: ghc - compilerVersion: 9.12.0.20241031 - setup-method: ghcup - allow-failure: false - compiler: ghc-9.12.0.20241031 compilerKind: ghc compilerVersion: 9.12.0.20241031 @@ -43,11 +38,6 @@ 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.3 compilerKind: ghc compilerVersion: 9.8.3 @@ -288,41 +278,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -338,20 +308,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 04e48761..f25586a7 100644 --- a/fixtures/fail-versions.github +++ b/fixtures/fail-versions.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/fixtures/irc-channels.github b/fixtures/irc-channels.github index f5fde459..3845f126 100644 --- a/fixtures/irc-channels.github +++ b/fixtures/irc-channels.github @@ -160,41 +160,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -210,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: | diff --git a/fixtures/messy.github b/fixtures/messy.github index 30aeaaf7..c6505f62 100644 --- a/fixtures/messy.github +++ b/fixtures/messy.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -184,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: | diff --git a/fixtures/psql.github b/fixtures/psql.github index 1a2ba925..58b7e938 100644 --- a/fixtures/psql.github +++ b/fixtures/psql.github @@ -139,41 +139,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -189,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: | diff --git a/fixtures/travis-patch.github b/fixtures/travis-patch.github index bec49e4e..e5f0845f 100644 --- a/fixtures/travis-patch.github +++ b/fixtures/travis-patch.github @@ -133,41 +133,21 @@ jobs: compilerVersion: 8.2.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.2 - compilerKind: ghc - compilerVersion: 8.2.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.2.1 compilerKind: ghc compilerVersion: 8.2.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.2.1 - compilerKind: ghc - compilerVersion: 8.2.1 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.2 - compilerKind: ghc - compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - compiler: ghc-8.0.1 compilerKind: ghc compilerVersion: 8.0.1 setup-method: ghcup allow-failure: false - - compiler: ghc-8.0.1 - compilerKind: ghc - compilerVersion: 8.0.1 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt-get install @@ -183,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: | diff --git a/haskell-ci.cabal b/haskell-ci.cabal index 978d8f82..858deeb5 100644 --- a/haskell-ci.cabal +++ b/haskell-ci.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: haskell-ci -version: 0.19.20241111 +version: 0.19.20241114 synopsis: Cabal package script generator for Travis-CI description: Script generator (@haskell-ci@) for @@ -239,3 +239,4 @@ test-suite golden , Diff ^>=0.4.0 || ^>=0.5 , tasty ^>=1.4.1 || ^>=1.5 , tasty-golden ^>=2.3.1.1 + , tasty-hunit \ No newline at end of file diff --git a/src/HaskellCI/Config/History.hs b/src/HaskellCI/Config/History.hs index 30bb70ca..fdbe1f64 100644 --- a/src/HaskellCI/Config/History.hs +++ b/src/HaskellCI/Config/History.hs @@ -38,6 +38,13 @@ configHistory = , ghcupVanilla = C.withinVersion (C.mkVersion [9,8,3]) , ghcupPrerelease = C.orLaterVersion (C.mkVersion [9,12,0]) } + , ver 0 19 2024114 := \cfg -> cfg + & field @"cfgSetupMethods" .~ PerSetupMethod + { hvrPpa = C.noVersion + , ghcup = invertVersionRange (C.withinVersion (C.mkVersion [9,8,3])) /\ C.earlierVersion (C.mkVersion [9,12,0]) + , ghcupVanilla = C.withinVersion (C.mkVersion [9,8,3]) + , ghcupPrerelease = C.orLaterVersion (C.mkVersion [9,12,0]) + } ] where ver x y z = [x, y, z] diff --git a/test/Tests.hs b/test/Tests.hs index add7f169..132b2774 100644 --- a/test/Tests.hs +++ b/test/Tests.hs @@ -1,44 +1,79 @@ {-# LANGUAGE ViewPatterns #-} module Main (main) where -import Prelude () -import Prelude.Compat - import HaskellCI hiding (main) +import HaskellCI.Prelude -import Control.Arrow (first) import Data.Algorithm.Diff (PolyDiff (..), getGroupedDiff) -import Distribution.Utils.Generic (fromUTF8BS) import System.Directory (setCurrentDirectory) import System.FilePath (addExtension) import Test.Tasty (TestName, TestTree, defaultMain, testGroup) import Test.Tasty.Golden.Advanced (goldenTest) +import Test.Tasty.HUnit +import qualified Distribution.Version as C import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import qualified System.Console.ANSI as ANSI +import HaskellCI.Config.History +import HaskellCI.SetupMethod + main :: IO () main = do setCurrentDirectory "fixtures/" - defaultMain $ testGroup "fixtures" - [ fixtureGoldenTest "all-versions" - , fixtureGoldenTest "empty-line" - , fixtureGoldenTest "fail-versions" - , fixtureGoldenTest "irc-channels" - , fixtureGoldenTest "messy" - , fixtureGoldenTest "psql" - , fixtureGoldenTest "travis-patch" - , fixtureGoldenTest "enabled-jobs" - , fixtureGoldenTest "doctest" - , fixtureGoldenTest "doctest-version" - , testGroup "copy-fields" - [ fixtureGoldenTest "copy-fields-all" - , fixtureGoldenTest "copy-fields-some" - , fixtureGoldenTest "copy-fields-none" + defaultMain $ testGroup "haskell-ci" + [ testGroup "fixtures" + [ fixtureGoldenTest "all-versions" + , fixtureGoldenTest "empty-line" + , fixtureGoldenTest "fail-versions" + , fixtureGoldenTest "irc-channels" + , fixtureGoldenTest "messy" + , fixtureGoldenTest "psql" + , fixtureGoldenTest "travis-patch" + , fixtureGoldenTest "enabled-jobs" + , fixtureGoldenTest "doctest" + , fixtureGoldenTest "doctest-version" + , testGroup "copy-fields" + [ fixtureGoldenTest "copy-fields-all" + , fixtureGoldenTest "copy-fields-some" + , fixtureGoldenTest "copy-fields-none" + ] + ] + , testGroup "setup-methods" + -- we test that haskell-ci default configuration setup-methods + -- * span all possible GHC version + -- * have only one setup-method per version, i.e. setup-methods have disjoint GHC versions spans + -- + [ testCase "span-whole-range" $ do + let methods :: PerSetupMethod C.VersionRange + methods = cfgSetupMethods defaultConfig + + let vr = simplify $ foldr (\/) C.noVersion methods + + vr @?= C.anyVersion + + , testCase "disjoint" $ do + let methods :: PerSetupMethod VersionRange + methods = cfgSetupMethods defaultConfig + + let indices :: [(SetupMethod,SetupMethod)] + indices = pairs [minBound .. maxBound] + + for_ indices $ \(i, j) -> do + let x = index methods i + let y = index methods j + assertEqual (show (i, j)) C.noVersion (simplify (x /\ y)) ] ] +simplify :: VersionRange -> VersionRange +simplify = C.fromVersionIntervals . C.toVersionIntervals + +pairs :: [a] -> [(a,a)] +pairs [] = [] +pairs (x:xs) = map ((,) x) xs ++ pairs xs + -- | -- @ -- travisFromConfigFile ::