Skip to content

Commit

Permalink
CI: force MacOS jobs to use Intel runners (macos-13) (backport #9949) (
Browse files Browse the repository at this point in the history
…#9956)

* 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 d36e0d0)

# Conflicts:
#	.github/workflows/validate.yml

* CI: GitHub MacOS runners lost ghcup since 2024-04-27, so use haskell-action/setup instead

(cherry picked from commit 082d952)

* fixup! more compat with new macos runners

(cherry picked from commit 326a1f6)

* !fixup resolve conflicts

* 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.

---------

Co-authored-by: Artem Pelenitsyn <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
  • Loading branch information
3 people authored Apr 29, 2024
1 parent 56fb1dc commit d871c1e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
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:
Expand Down
4 changes: 2 additions & 2 deletions cabal-testsuite/PackageTests/Manpage/cabal.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
3 changes: 3 additions & 0 deletions cabal-testsuite/src/Test/Cabal/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d871c1e

Please sign in to comment.