@@ -30,22 +30,18 @@ jobs:
3030 ghc : ' 9.6'
3131 cabal : ' 3.8.1.0'
3232 steps :
33- - uses : actions/checkout@v3
34-
35- - uses : haskell/ghcup-setup@v1
33+ - uses : actions/checkout@v4
3634
3735 - name : Install dependencies (Ubuntu)
3836 if : runner.os == 'Linux'
3937 run : |
4038 sudo apt-get -y update
4139 sudo apt-get -y install libtinfo6 libncurses6
4240
43- - name : Install ghc/cabal
44- run : |
45- set -eux
46- ghcup install ghc --set ${{ matrix.ghc }}
47- ghcup install cabal ${{ matrix.cabal }}
48- shell : bash
41+ - uses : haskell/ghcup-setup@v1
42+ with :
43+ ghc : ${{ matrix.ghc }}
44+ cabal : ${{ matrix.cabal }}
4945
5046 - name : Build
5147 run : |
@@ -122,6 +118,7 @@ jobs:
122118 runs-on : ${{ matrix.os }}
123119 env :
124120 MACOSX_DEPLOYMENT_TARGET : 10.13
121+ HOMEBREW_CHANGE_ARCH_TO_ARM : 1
125122 strategy :
126123 fail-fast : false
127124 matrix :
@@ -136,25 +133,26 @@ jobs:
136133 - name : Checkout code
137134 uses : actions/checkout@v4
138135
136+ - name : Install prerequisites
137+ run : |
138+ bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
139+ echo PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" >> "$GITHUB_ENV"
140+ echo CC="$HOME/.brew/opt/llvm@13/bin/clang" >> "$GITHUB_ENV"
141+ echo CXX="$HOME/.brew/opt/llvm@13/bin/clang++" >> "$GITHUB_ENV"
142+ echo LD=ld >> "$GITHUB_ENV"
143+ echo AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" >> "$GITHUB_ENV"
144+ echo RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" >> "$GITHUB_ENV"
145+
139146 - uses : haskell/ghcup-setup@v1
147+ with :
148+ ghc : ${{ matrix.ghc }}
149+ cabal : ${{ matrix.cabal }}
140150
141151 - name : Run build
142152 run : |
143- bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
144- export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH"
145- export CC="$HOME/.brew/opt/llvm@13/bin/clang"
146- export CXX="$HOME/.brew/opt/llvm@13/bin/clang++"
147- export LD=ld
148- export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar"
149- export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib"
150- . .github/scripts/env.sh
151- ghcup install ghc --set ${{ matrix.ghc }}
152- ghcup install cabal --set latest
153153 cabal update
154154 cabal test
155155 cabal bench
156- env :
157- HOMEBREW_CHANGE_ARCH_TO_ARM : 1
158156
159157 freebsd :
160158 runs-on : ${{ matrix.os }}
@@ -170,14 +168,17 @@ jobs:
170168 - name : Checkout code
171169 uses : actions/checkout@v4
172170
171+ - name : Install prerequisites
172+ run : |
173+ sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
174+
173175 - uses : haskell/ghcup-setup@v1
176+ with :
177+ ghc : ${{ matrix.ghc }}
178+ cabal : ${{ matrix.cabal }}
174179
175180 - name : Run build
176181 run : |
177- sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
178- . .github/scripts/env.sh
179- ghcup install ghc --set ${{ matrix.ghc }}
180- ghcup install cabal --set recommended
181182 cabal update
182183 cabal test
183184 cabal bench
0 commit comments