From ba407e067ac87850bcfb0343e5d42b5d6ce7d5f9 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 17 Mar 2023 01:45:15 +0100 Subject: [PATCH 01/12] Bump upper bounds for some deps due to GHC 9.6 --- Cabal-tests/Cabal-tests.cabal | 4 ++-- Cabal-tree-diff/Cabal-tree-diff.cabal | 2 +- cabal-install-solver/cabal-install-solver.cabal | 4 ++-- cabal-install/cabal-install.cabal | 2 +- cabal-testsuite/cabal-testsuite.cabal | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal index ce49eab8eb4..bb42abc7fc7 100644 --- a/Cabal-tests/Cabal-tests.cabal +++ b/Cabal-tests/Cabal-tests.cabal @@ -95,7 +95,7 @@ test-suite parser-tests , tasty-golden >=2.3.1.1 && <2.4 , tasty-hunit , tasty-quickcheck - , tree-diff >=0.1 && <0.3 + , tree-diff >=0.1 && <0.4 ghc-options: -Wall default-language: Haskell2010 @@ -161,7 +161,7 @@ test-suite hackage-tests , optparse-applicative >=0.13.2.0 && <0.17 , stm >=2.4.5.0 && <2.6 , tar >=0.5.0.3 && <0.6 - , tree-diff >=0.1 && <0.3 + , tree-diff >=0.1 && <0.4 ghc-options: -Wall -rtsopts -threaded default-extensions: CPP diff --git a/Cabal-tree-diff/Cabal-tree-diff.cabal b/Cabal-tree-diff/Cabal-tree-diff.cabal index 564584c0154..34e0b6de00b 100644 --- a/Cabal-tree-diff/Cabal-tree-diff.cabal +++ b/Cabal-tree-diff/Cabal-tree-diff.cabal @@ -13,7 +13,7 @@ library , base , Cabal-syntax ^>=3.11.0.0 , Cabal ^>=3.11.0.0 - , tree-diff ^>=0.1 || ^>=0.2 + , tree-diff ^>=0.1 || ^>=0.2 || ^>=0.3 exposed-modules: Data.TreeDiff.Instances.Cabal other-modules: diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal index 0c3170d71b2..7849e53b5b6 100644 --- a/cabal-install-solver/cabal-install-solver.cabal +++ b/cabal-install-solver/cabal-install-solver.cabal @@ -105,7 +105,7 @@ library build-depends: , array >=0.4 && <0.6 - , base >=4.10 && <4.18 + , base >=4.10 && <4.19 , bytestring >=0.10.6.0 && <0.12 , Cabal ^>=3.11 , Cabal-syntax ^>=3.11 @@ -138,7 +138,7 @@ Test-Suite unit-tests UnitTests.Distribution.Solver.Modular.MessageUtils build-depends: - , base >= 4.10 && <4.18 + , base >= 4.10 && <4.19 , Cabal , Cabal-syntax , cabal-install-solver diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal index b2ac10004a5..99fa0398ae6 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -46,7 +46,7 @@ common warnings ghc-options: -Wunused-packages common base-dep - build-depends: base >=4.10 && <4.18 + build-depends: base >=4.10 && <4.19 common cabal-dep build-depends: Cabal ^>=3.11 diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal index eae22717dbc..204859e50d5 100644 --- a/cabal-testsuite/cabal-testsuite.cabal +++ b/cabal-testsuite/cabal-testsuite.cabal @@ -26,7 +26,7 @@ common shared default-language: Haskell2010 build-depends: - , base >= 4.9 && <4.18 + , base >= 4.9 && <4.19 -- this needs to match the in-tree lib:Cabal version , Cabal ^>= 3.11.0.0 , Cabal-syntax ^>= 3.11.0.0 @@ -80,7 +80,7 @@ library if !os(windows) build-depends: - , unix ^>= 2.6.0.0 || ^>= 2.7.0.0 + , unix ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0 else build-depends: , Win32 From 561bf1b7c6f08dfcb6e4bafbe7c4200c4eda6c71 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 12 Mar 2023 22:09:23 -0400 Subject: [PATCH 02/12] CI GHC 9.6: cabal-plan allow-newer base (TODO: revert) --- .github/workflows/validate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index fbbbbc45b76..3bb243097f4 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -97,7 +97,7 @@ jobs: - name: Install cabal-plan run: | cd $(mktemp -d) - cabal install cabal-plan --constraint='cabal-plan +exe' + cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH # The tool is not essential to the rest of the test suite. If @@ -254,7 +254,7 @@ jobs: - name: Install cabal-plan run: | cd $(mktemp -d) - cabal install cabal-plan --constraint='cabal-plan +exe' --allow-newer + cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH # The tool is not essential to the rest of the test suite. If @@ -376,7 +376,7 @@ jobs: - name: Install cabal-plan run: | cd $(mktemp -d) - cabal install cabal-plan --constraint='cabal-plan +exe' + cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH - name: Validate build @@ -424,7 +424,7 @@ jobs: - name: Install cabal-plan run: | cd $(mktemp -d) - cabal install cabal-plan --constraint='cabal-plan +exe' + cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH - name: Download cabal executable from workflow artifacts From db4d518e6d380100ae818516028399983eac8ea2 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Mon, 13 Mar 2023 14:40:27 -0400 Subject: [PATCH 03/12] CI GHC 9.6: allow-newer base for rere (TODO: revert) --- .github/workflows/validate.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3bb243097f4..8f3d0585216 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -131,6 +131,11 @@ jobs: fi echo "FLAGS=$FLAGS" >> $GITHUB_ENV + - name: Allow newer dependencies when built with latest GHC + if: ${{ matrix.ghc }} == '9.6.1' + run: | + echo "allow-newer: rere:base, rere:transformers" >> cabal.project.validate + - name: Validate print-config run: sh validate.sh $FLAGS -s print-config From d04a881d78dc7c04518bac2e40c13f974bbd3845 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Thu, 23 Mar 2023 02:54:18 +0100 Subject: [PATCH 04/12] CI GHC 9.6: have to disable *-suite validation (TODO: revert) See comments. --- .github/workflows/validate.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8f3d0585216..b4077a8d04c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -182,6 +182,10 @@ jobs: run: sh validate.sh $FLAGS -s lib-tests - name: Validate lib-suite + # Have to disable *-suite validation: + # - the Windows@9.6.1 problem is tracked at https://github.com/haskell/cabal/issues/8858 + # - but curently can't run it with GHC 9.6, tracking: https://github.com/haskell/cabal/issues/8883 + if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1') run: sh validate.sh $FLAGS -s lib-suite - name: Validate cli-tests @@ -189,7 +193,8 @@ jobs: run: sh validate.sh $FLAGS -s cli-tests - name: Validate cli-suite - if: matrix.cli != 'false' + # Have to disable *-suite validation, see above the comment for lib-suite + if: ((runner.os != 'Windows') || (matrix.ghc != '9.6.1')) && (matrix.cli != 'false') run: sh validate.sh $FLAGS -s cli-suite # The job below is a copy-paste of validate with the necessary tweaks From 7ce7b7ac42d3629141239c8d89ef09c56ad5fc1f Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 12 Mar 2023 11:34:23 -0400 Subject: [PATCH 05/12] CI: add GHC 9.6.1 and bump minor versions on other series --- .github/workflows/validate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b4077a8d04c..5a04a356e19 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -23,10 +23,10 @@ on: env: # We choose a stable ghc version across all os's # which will be used to do the next release - GHC_FOR_RELEASE: '9.2.3' + GHC_FOR_RELEASE: '9.2.7' # Ideally we should use the version about to be released for hackage tests and benchmarks - GHC_FOR_SOLVER_BENCHMARKS: '9.2.3' - GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.3' + GHC_FOR_SOLVER_BENCHMARKS: '9.2.7' + GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.7' COMMON_FLAGS: '-j 2 -v' jobs: @@ -38,7 +38,7 @@ jobs: strategy: matrix: os: ["ubuntu-20.04", "macos-latest", "windows-latest"] - ghc: ["9.4.2", "9.2.3", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] + ghc: ["9.6.1", "9.4.4", "9.2.7", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] exclude: # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356 - os: "windows-latest" From ea1ec5771b5403e63b55197fc3ddceba1f23b4f8 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Thu, 30 Mar 2023 03:08:31 +0200 Subject: [PATCH 06/12] CI: no need in chown for ghcup anymore --- .github/workflows/validate.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5a04a356e19..71e8b5d2d08 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -71,16 +71,6 @@ jobs: key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- - # See https://github.com/haskell/cabal/pull/8739 - - name: Sudo chmod to permit ghcup to update its cache - run: | - if [[ "${{ runner.os }}" == "Linux" ]]; then - sudo ls -lah /usr/local/.ghcup/cache - sudo mkdir -p /usr/local/.ghcup/cache - sudo ls -lah /usr/local/.ghcup/cache - sudo chown -R $USER /usr/local/.ghcup - sudo chmod -R 777 /usr/local/.ghcup - fi - uses: haskell/actions/setup@v2 id: setup-haskell with: From 4f583550936da633602acbe479e762707ce551a4 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Thu, 30 Mar 2023 03:10:43 +0200 Subject: [PATCH 07/12] CI: no need to exclude caching on Windows anymore --- .github/workflows/validate.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 71e8b5d2d08..ab2f9d4ad36 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -59,10 +59,7 @@ jobs: # See the following link for a breakdown of the following step # https://github.com/haskell/actions/issues/7#issuecomment-745697160 - # - # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded - - if: ${{ runner.os != 'Windows' }} - uses: actions/cache@v3 + - uses: actions/cache@v3 with: # validate.sh uses a special build dir path: | @@ -213,8 +210,7 @@ jobs: # https://github.com/haskell/actions/issues/7#issuecomment-745697160 # # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded - - if: ${{ runner.os != 'Windows' }} - uses: actions/cache@v3 + - uses: actions/cache@v3 with: # validate.sh uses a special build dir path: | From 3b8e6e9bf19c049b0ff981577731b906386ce48a Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Thu, 30 Mar 2023 04:08:47 +0200 Subject: [PATCH 08/12] CI: no need to restore cache before setup-haskell undo 6bd17fc from #8844; the change was made in response to an issue that was later fixed on the haskell/action side --- .github/workflows/validate.yml | 46 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ab2f9d4ad36..e8b97ac6386 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -206,19 +206,6 @@ jobs: - uses: actions/checkout@v3 - # See the following link for a breakdown of the following step - # https://github.com/haskell/actions/issues/7#issuecomment-745697160 - # - # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded - - uses: actions/cache@v3 - with: - # validate.sh uses a special build dir - path: | - ${{ steps.setup-haskell.outputs.cabal-store }} - dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- - # See https://github.com/haskell/cabal/pull/8739 - name: Sudo chmod to permit ghcup to update its cache run: | @@ -244,6 +231,17 @@ jobs: run: | git config --global protocol.file.allow always + # See the following link for a breakdown of the following step + # https://github.com/haskell/actions/issues/7#issuecomment-745697160 + - uses: actions/cache@v3 + with: + # validate.sh uses a special build dir + path: | + ${{ steps.setup-haskell.outputs.cabal-store }} + dist-* + key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- + # The '+exe' constraint below is important, otherwise cabal-install # might decide to build the library but not the executable which is # what we need. @@ -347,17 +345,6 @@ jobs: git fetch origin $GITHUB_SHA:temporary-ci-branch git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA) - # As we are reusing the cached build dir from the previous step - # the generated artifacts are available here, - # including the cabal executable and the test suite - - uses: actions/cache@v3 - with: - path: | - ${{ steps.setup-haskell.outputs.cabal-store }} - dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- - - name: Install extra compiler run: | apt-get update @@ -369,6 +356,17 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133 + # As we are reusing the cached build dir from the previous step + # the generated artifacts are available here, + # including the cabal executable and the test suite + - uses: actions/cache@v3 + with: + path: | + ${{ steps.setup-haskell.outputs.cabal-store }} + dist-* + key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- + - name: Install cabal-plan run: | cd $(mktemp -d) From bb10ae32bf591cacbdd4241f91647813fe4ca0d1 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 31 Mar 2023 15:41:22 +0200 Subject: [PATCH 09/12] CI: remove separate prerelease workflow haskell/acitons support prereleases since recently, and so, a separate workflow is not necessary. --- .github/workflows/validate.yml | 128 --------------------------------- 1 file changed, 128 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e8b97ac6386..0ec29f46ab7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -184,134 +184,6 @@ jobs: if: ((runner.os != 'Windows') || (matrix.ghc != '9.6.1')) && (matrix.cli != 'false') run: sh validate.sh $FLAGS -s cli-suite - # The job below is a copy-paste of validate with the necessary tweaks - # to make all work with an upcoming GHC. Those tweaks include: - # - ghcup needs the prerelease channel activated - # - allow-newer for base libraries and Cabal* libraries - # - (sometimes) disabling some parts on Windows because it's hard to figure - # out why they fail - validate-prerelease: - # TODO: reenable when the next GHC prerelease appears - if: false - - name: Validate ${{ matrix.os }} ghc-prerelease - runs-on: ${{ matrix.os }} - outputs: - GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }} - strategy: - matrix: - os: ["ubuntu-20.04", "macos-latest", "windows-latest"] - - steps: - - - uses: actions/checkout@v3 - - # See https://github.com/haskell/cabal/pull/8739 - - name: Sudo chmod to permit ghcup to update its cache - run: | - if [[ "${{ runner.os }}" == "Linux" ]]; then - sudo ls -lah /usr/local/.ghcup/cache - sudo mkdir -p /usr/local/.ghcup/cache - sudo ls -lah /usr/local/.ghcup/cache - sudo chown -R $USER /usr/local/.ghcup - sudo chmod -R 777 /usr/local/.ghcup - fi - - - name: ghcup - run: | - ghcup --version - ghcup config set cache true - ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml - ghcup install ghc --set 9.6.0.20230210 - ghcup install cabal --set latest - ghc --version - cabal update - - - name: Work around git problem https://bugs.launchpad.net/ubuntu/+source/git/+bug/1993586 (cabal PR #8546) - run: | - git config --global protocol.file.allow always - - # See the following link for a breakdown of the following step - # https://github.com/haskell/actions/issues/7#issuecomment-745697160 - - uses: actions/cache@v3 - with: - # validate.sh uses a special build dir - path: | - ${{ steps.setup-haskell.outputs.cabal-store }} - dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- - - # The '+exe' constraint below is important, otherwise cabal-install - # might decide to build the library but not the executable which is - # what we need. - - name: Install cabal-plan - run: | - cd $(mktemp -d) - cabal install cabal-plan --allow-newer="base" --constraint='cabal-plan +exe' - echo "$HOME/.cabal/bin:$HOME/.local/bin" >> $GITHUB_PATH - - # The tool is not essential to the rest of the test suite. If - # hackage-repo-tool is not present, any test that requires it will - # be skipped. - # We want to keep this in the loop but we don't want to fail if - # hackage-repo-tool breaks or fails to support a newer GHC version. - - name: Install hackage-repo-tool - continue-on-error: true - run: | - cd $(mktemp -d) - cabal install hackage-repo-tool - - # Needed by cabal-testsuite/PackageTests/Configure/setup.test.hs - - name: Install Autotools - if: runner.os == 'macOS' - run: | - brew install automake - - - name: Allow newer boot libraries - run: | - echo "allow-newer: base, template-haskell, ghc-prim, Cabal-syntax, Cabal-described, Cabal, cabal-install-solver, cabal-install" >> cabal.project.validate - - - name: Set validate inputs - run: | - FLAGS="${{ env.COMMON_FLAGS }}" - if [[ "${{ matrix.cli }}" == "false" ]]; then - FLAGS="$FLAGS --lib-only" - fi - echo "FLAGS=$FLAGS" >> $GITHUB_ENV - - - name: Validate print-config - run: sh validate.sh $FLAGS -s print-config - - - name: Validate print-tool-versions - run: sh validate.sh $FLAGS -s print-tool-versions - - - name: Validate build - run: sh validate.sh $FLAGS -s build - - - name: Validate lib-tests - env: - # `rawSystemStdInOut reports text decoding errors` - # test does not find ghc without the full path in windows - GHCPATH: ${{ steps.setup-haskell.outputs.ghc-exe }} - run: sh validate.sh $FLAGS -s lib-tests - - - name: Validate lib-suite - # see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848 - # for discussion about the trouble on Windows - if: ${{ runner.os != 'Windows' }} - run: sh validate.sh $FLAGS -s lib-suite - - - name: Validate cli-tests - if: matrix.cli != 'false' - run: sh validate.sh $FLAGS -s cli-tests - - - name: Validate cli-suite - # see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848 - # for discussion about the trouble on Windows - if: ( runner.os != 'Windows' ) && ( matrix.cli != 'false' ) - run: sh validate.sh $FLAGS -s cli-suite - validate-old-ghcs: name: Validate old ghcs ${{ matrix.extra-ghc }} runs-on: ubuntu-20.04 From a68c07dde2d8dd6f036bd827a9cc2dc47b64269f Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 31 Mar 2023 15:43:08 +0200 Subject: [PATCH 10/12] CI: cleanup the cache key --- .github/workflows/validate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 0ec29f46ab7..e069d714bf7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -65,8 +65,8 @@ jobs: path: | ${{ steps.setup-haskell.outputs.cabal-store }} dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- - uses: haskell/actions/setup@v2 id: setup-haskell @@ -236,8 +236,8 @@ jobs: path: | ${{ steps.setup-haskell.outputs.cabal-store }} dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- - name: Install cabal-plan run: | From 2e8a1e1da378e143afca56c86f4d7d3df48b9e74 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 31 Mar 2023 15:50:25 +0200 Subject: [PATCH 11/12] CI: remove the matrix.cli parameter It hasn't been used for a while now. --- .github/workflows/validate.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e069d714bf7..c8657406a2d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -107,9 +107,6 @@ jobs: - name: Set validate inputs run: | FLAGS="${{ env.COMMON_FLAGS }}" - if [[ "${{ matrix.cli }}" == "false" ]]; then - FLAGS="$FLAGS --lib-only" - fi if [[ ${{ matrix.ghc }} == ${{ env.GHC_FOR_SOLVER_BENCHMARKS }} ]]; then FLAGS="$FLAGS --solver-benchmarks" fi @@ -133,7 +130,7 @@ jobs: run: sh validate.sh $FLAGS -s build - name: Tar cabal head executable - if: matrix.cli != 'false' && matrix.ghc == env.GHC_FOR_RELEASE + if: matrix.ghc == env.GHC_FOR_RELEASE run: | CABAL_EXEC=$(cabal-plan list-bin --builddir=dist-newstyle-validate-ghc-${{ matrix.ghc }} cabal-install:exe:cabal) # We have to tar the executable to preserve executable permissions @@ -155,7 +152,7 @@ jobs: # - Reuse it in the dogfooding job (although we could use the cached build dir) # - Make it available in the workflow to make easier testing it locally - name: Upload cabal-install executable to workflow artifacts - if: matrix.cli != 'false' && matrix.ghc == env.GHC_FOR_RELEASE + if: matrix.ghc == env.GHC_FOR_RELEASE uses: actions/upload-artifact@v3 with: name: cabal-${{ runner.os }}-${{ matrix.ghc }} @@ -176,12 +173,11 @@ jobs: run: sh validate.sh $FLAGS -s lib-suite - name: Validate cli-tests - if: matrix.cli != 'false' run: sh validate.sh $FLAGS -s cli-tests - name: Validate cli-suite # Have to disable *-suite validation, see above the comment for lib-suite - if: ((runner.os != 'Windows') || (matrix.ghc != '9.6.1')) && (matrix.cli != 'false') + if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1') run: sh validate.sh $FLAGS -s cli-suite validate-old-ghcs: From 420ccd80d99b165ac143726b1cf9a47a3689f7f6 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 2 Apr 2023 02:14:10 +0200 Subject: [PATCH 12/12] After moving GHC 9.4.2->9.4.4 some broken Windows tests work Partially revert 78cbeba1a6639ae870d5f3ca03c7dd4603b2cdcb. --- cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs | 3 --- cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs | 3 --- cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdClean/Script/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdRun/Script/cabal.test.hs | 3 --- .../NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs | 3 --- .../NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs | 3 --- .../PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs | 3 --- 14 files changed, 42 deletions(-) diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs index b492140b4ed..93588d88c3f 100644 --- a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs +++ b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude -- Test internal custom preprocessor main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do skipUnless "no Cabal for GHC" =<< hasCabalForGhc -- old Cabal's ./Setup.hs output is difficult to normalise diff --git a/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs b/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs index 377b4a01466..7d5d4f0aff9 100644 --- a/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs +++ b/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs @@ -1,7 +1,4 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal "v2-build" ["foreign-opts-c-exe"] withPlan $ runPlanExe "foreign-opts-c" "foreign-opts-c-exe" [] diff --git a/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs b/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs index 83177d702e3..10024955a78 100644 --- a/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs +++ b/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs @@ -1,7 +1,4 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal "v2-build" ["foreign-opts-cxx-exe"] withPlan $ runPlanExe "foreign-opts-cxx" "foreign-opts-cxx-exe" [] diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs index 055979ea65c..9174ba94a6c 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal "v2-bench" [ "--benchmark-option=1" , "--benchmark-options=\"2 3\"" diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs index 7e4c31a6af7..db31636dc42 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal' "v2-build" ["script.hs"] env <- getTestEnv diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs index 863d7706ab2..18c1becba42 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs @@ -1,8 +1,5 @@ import Test.Cabal.Prelude main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal' "v2-build" ["script.hs"] cabal' "v2-build" ["script.hs"] diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs index f54bf5a4bcf..8063d229034 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs @@ -2,9 +2,6 @@ import Test.Cabal.Prelude import System.Directory (copyFile, removeFile) main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do env <- getTestEnv let td = testCurrentDir env diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs index 0eac6291ff2..39ba5185e94 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs @@ -2,9 +2,6 @@ import Test.Cabal.Prelude import System.Directory (copyFile, removeFile) main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do env <- getTestEnv let td = testCurrentDir env diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs index aa0fc3e9d2f..d3870ce1520 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal' "v2-build" ["script.hs"] cabal' "v2-clean" ["script.hs"] diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs index e145dc9d863..045c88117d7 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do res <- cabal' "v2-run" ["script.hs"] assertOutputContains "Hello World" res diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs index e010ea6ec05..b78a6941a79 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs @@ -1,7 +1,4 @@ import Test.Cabal.Prelude main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal' "v2-run" ["with sp"] >>= assertOutputContains "Hello World" diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs index 3092a6ea57b..7df7f1451bc 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs @@ -1,8 +1,5 @@ import Test.Cabal.Prelude main = cabalTest . void $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal' "v2-run" ["script.hs"] cabal' "v2-run" ["script.hs"] diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs index 731fb7182da..8c92079136b 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do -- script is called "s.hs" to avoid Windows long path issue in CI res <- cabal' "v2-run" ["s.hs"] assertOutputContains "Hello World" res diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs index c0493cf4629..e9b8f5b6c12 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs @@ -1,9 +1,6 @@ import Test.Cabal.Prelude main = cabalTest $ do - isWin <- isWindows - ghc94 <- isGhcVersion "== 9.4.*" - expectBrokenIf (isWin && ghc94) 8451 $ do cabal "v2-test" [ "--test-option=1" , "--test-options=\"2 3\""