2727          - os : windows-latest 
2828            ghc : ' 9.8' 
2929    steps :
30-     - uses : actions/checkout@v3  
30+     - uses : actions/checkout@v4  
3131
3232    - name : Install dependencies (Ubuntu) 
3333      if : runner.os == 'Linux' 
3737
3838     - name : Install GHCup 
3939      uses : haskell/ghcup-setup@v1 
40- 
41-     - name : Install ghc/cabal 
42-       run : | 
43-         set -eux 
44-         ghcup install ghc --set ${{ matrix.ghc }} 
45-         ghcup install cabal --set latest 
46-        shell : bash 
40+       with :
41+         ghc : ${{ matrix.ghc }} 
42+         cabal : latest 
4743
4844    - name : Build 
4945      run : | 
10197    runs-on : ${{ matrix.os }} 
10298    env :
10399      MACOSX_DEPLOYMENT_TARGET : 10.13 
100+       HOMEBREW_CHANGE_ARCH_TO_ARM : 1 
104101    strategy :
105102      fail-fast : false 
106103      matrix :
@@ -115,22 +112,25 @@ jobs:
115112      - name : Checkout code 
116113        uses : actions/checkout@v4 
117114
118-       - name : Install GHCup 
119-         uses : haskell/ghcup-setup@v1 
115+       - name : Install prerequisites 
116+         run : | 
117+           bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake 
118+           echo PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" >> "$GITHUB_ENV" 
119+           echo CC="$HOME/.brew/opt/llvm@13/bin/clang" >> "$GITHUB_ENV" 
120+           echo CXX="$HOME/.brew/opt/llvm@13/bin/clang++" >> "$GITHUB_ENV" 
121+           echo LD=ld >> "$GITHUB_ENV" 
122+           echo AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" >> "$GITHUB_ENV" 
123+           echo RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" >> "$GITHUB_ENV" 
124+ 
125+        - uses : haskell/ghcup-setup@v1 
126+         with :
127+           ghc : ${{ matrix.ghc }} 
128+           cabal : latest 
120129
121130      - name : Run build 
122131        run : | 
123-           bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake 
124-           export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" 
125-           export CC="$HOME/.brew/opt/llvm@13/bin/clang" 
126-           export CXX="$HOME/.brew/opt/llvm@13/bin/clang++" 
127-           export LD=ld 
128-           export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" 
129-           export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" 
130132          cabal update 
131133          cabal test 
132-          env :
133-           HOMEBREW_CHANGE_ARCH_TO_ARM : 1 
134134
135135   freebsd :
136136    runs-on : ${{ matrix.os }} 
@@ -152,6 +152,9 @@ jobs:
152152
153153       - name : Install GHCup 
154154        uses : haskell/ghcup-setup@v1 
155+         with :
156+           ghc : ${{ matrix.ghc }} 
157+           cabal : latest 
155158
156159      - name : Run build 
157160        run : | 
0 commit comments