From 9474d03046b0146160917049359fa80011b00144 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 28 Apr 2024 02:43:23 +0000 Subject: [PATCH 1/5] CI: force MacOS jobs to use Intel runners (`macos-13`) GitHub just switched macos-latest to the ARM chips (now alisasing `macos-14`), and it brings a bunch of problems. - First of all, GHC's 8.8 and 8.6 don't exist there. - ghcup and llvm are unavailable For the time being, lets stay on the previous version of the runner. (cherry picked from commit d36e0d097dfebc87b4f44af613b8dff2f9ad443e) # Conflicts: # .github/workflows/validate.yml --- .github/workflows/bootstrap.yml | 2 +- .github/workflows/validate.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index ae4a038f39d..bf9b6c1f463 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -32,7 +32,7 @@ jobs: os: [ubuntu-latest] ghc: ["9.0.2", "9.2.8", "9.4.8", "9.6.4", "9.8.2"] include: - - os: macos-latest + - os: macos-13 ghc: "9.2.8" name: Bootstrap ${{ matrix.os }} ghc-${{ matrix.ghc }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 7b7d829ff80..8ce465203d7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -66,7 +66,11 @@ jobs: GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }} strategy: matrix: +<<<<<<< HEAD os: ["ubuntu-latest", "macos-latest", "windows-latest"] +======= + os: [ubuntu-latest, macos-13, windows-latest] +>>>>>>> d36e0d097 (CI: force MacOS jobs to use Intel runners (`macos-13`)) # If you remove something from here.. then add it to the old-ghcs job. ghc: ["9.8.2", "9.6.4", "9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5"] exclude: From 69144fa5557e68df9be27b8ed726744bdbdb467a Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 28 Apr 2024 17:49:43 +0000 Subject: [PATCH 2/5] CI: GitHub MacOS runners lost ghcup since 2024-04-27, so use haskell-action/setup instead (cherry picked from commit 082d9520417651f594af0be577c0151627e6b3a0) --- .github/workflows/bootstrap.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index bf9b6c1f463..ecfb015c699 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -32,7 +32,7 @@ jobs: os: [ubuntu-latest] ghc: ["9.0.2", "9.2.8", "9.4.8", "9.6.4", "9.8.2"] include: - - os: macos-13 + - os: macos-latest ghc: "9.2.8" name: Bootstrap ${{ matrix.os }} ghc-${{ matrix.ghc }} runs-on: ${{ matrix.os }} @@ -52,28 +52,18 @@ jobs: restore-keys: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115- - uses: actions/checkout@v4 - # 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 + with: + ghc-version: ${{ matrix.ghc }} + - name: bootstrap.py run: | GHC_VERSION=${{ matrix.ghc }} - ghcup --version - ghcup config set cache true - ghcup install ghc $GHC_VERSION - # Fetch the bootstrap sources (we use linux dependencies also on macos) - python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) -d bootstrap/linux-$GHC_VERSION.json fetch + python3 bootstrap/bootstrap.py -d bootstrap/linux-$GHC_VERSION.json fetch # Bootstrap using the bootstrap sources - python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) --bootstrap-sources bootstrap-sources.tar.gz + python3 bootstrap/bootstrap.py --bootstrap-sources bootstrap-sources.tar.gz - name: Smoke test run: | From 3a40d55512c4f1d43bbdcde846a6391f340117fc Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 28 Apr 2024 22:37:38 +0000 Subject: [PATCH 3/5] fixup! more compat with new macos runners (cherry picked from commit 326a1f60e3f217b3f7fe05139eb1ca243a302d28) --- cabal-testsuite/PackageTests/Manpage/cabal.test.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-testsuite/PackageTests/Manpage/cabal.test.hs b/cabal-testsuite/PackageTests/Manpage/cabal.test.hs index 6b19fa4d7ce..68def219070 100644 --- a/cabal-testsuite/PackageTests/Manpage/cabal.test.hs +++ b/cabal-testsuite/PackageTests/Manpage/cabal.test.hs @@ -7,8 +7,8 @@ main = cabalTest $ do assertOutputContains ".B cabal install" r assertOutputDoesNotContain ".B cabal manpage" r - -- The following test of `cabal man` needs `nroff` which is not available under Windows. - unless (buildOS == Windows) $ do + -- The following test of `cabal man` needs `nroff` which is not available under Windows and OSX. + unless (buildOS == Windows || buildOS ==OSX) $ do -- Check that output of `cabal man --raw` can be passed through `nroff -man` -- without producing any warnings (which are printed to stderr). From b38d082d2e684275a0110d652bda727334b2e4e2 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Mon, 29 Apr 2024 15:16:10 -0400 Subject: [PATCH 4/5] !fixup resolve conflicts --- .github/workflows/validate.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8ce465203d7..2dc7816c523 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -66,11 +66,7 @@ jobs: GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }} strategy: matrix: -<<<<<<< HEAD - os: ["ubuntu-latest", "macos-latest", "windows-latest"] -======= - os: [ubuntu-latest, macos-13, windows-latest] ->>>>>>> d36e0d097 (CI: force MacOS jobs to use Intel runners (`macos-13`)) + os: ["ubuntu-latest", "macos-13", "windows-latest"] # If you remove something from here.. then add it to the old-ghcs job. ghc: ["9.8.2", "9.6.4", "9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5"] exclude: From 7579201cece8b555cc590f3f68a589df3572fa8e Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Mon, 29 Apr 2024 16:08:41 -0400 Subject: [PATCH 5/5] copy an import list from #9551 because `System.Process.Internals` just (like, within the past hour or so) started exporting a name we are using. --- cabal-testsuite/src/Test/Cabal/Server.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cabal-testsuite/src/Test/Cabal/Server.hs b/cabal-testsuite/src/Test/Cabal/Server.hs index 450c6f660c7..145d686bb30 100644 --- a/cabal-testsuite/src/Test/Cabal/Server.hs +++ b/cabal-testsuite/src/Test/Cabal/Server.hs @@ -40,6 +40,9 @@ import qualified GHC.IO.Exception as GHC import Distribution.Verbosity import System.Process.Internals + ( ProcessHandle__( OpenHandle ) + , withProcessHandle + ) #if mingw32_HOST_OS import qualified System.Win32.Process as Win32 #endif