Skip to content

Commit d931855

Browse files
committed
Merge branch 'ny-ci'
2 parents ecd3da9 + acca2d7 commit d931855

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

.github/workflows/test.yaml

+26-31
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,28 @@ jobs:
1515
matrix:
1616
os: [ubuntu-latest]
1717
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8']
18-
cabal: ['3.8.1.0']
1918
include:
2019
- os: macos-13
2120
ghc: '9.4'
22-
cabal: '3.8.1.0'
2321
- os: macos-13
2422
ghc: '9.6'
25-
cabal: '3.8.1.0'
2623
- os: windows-latest
2724
ghc: '9.4'
28-
cabal: '3.8.1.0'
2925
- os: windows-latest
3026
ghc: '9.6'
31-
cabal: '3.8.1.0'
3227
steps:
33-
- uses: actions/checkout@v3
34-
35-
- uses: haskell/ghcup-setup@v1
28+
- uses: actions/checkout@v4
3629

3730
- name: Install dependencies (Ubuntu)
3831
if: runner.os == 'Linux'
3932
run: |
4033
sudo apt-get -y update
4134
sudo apt-get -y install libtinfo6 libncurses6
4235
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
36+
- uses: haskell/ghcup-setup@v1
37+
with:
38+
ghc: ${{ matrix.ghc }}
39+
cabal: latest
4940

5041
- name: Build
5142
run: |
@@ -122,6 +113,7 @@ jobs:
122113
runs-on: ${{ matrix.os }}
123114
env:
124115
MACOSX_DEPLOYMENT_TARGET: 10.13
116+
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
125117
strategy:
126118
fail-fast: false
127119
matrix:
@@ -136,25 +128,25 @@ jobs:
136128
- name: Checkout code
137129
uses: actions/checkout@v4
138130

131+
- name: Install prerequisites
132+
run: |
133+
bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
134+
echo PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" >> "$GITHUB_ENV"
135+
echo CC="$HOME/.brew/opt/llvm@13/bin/clang" >> "$GITHUB_ENV"
136+
echo CXX="$HOME/.brew/opt/llvm@13/bin/clang++" >> "$GITHUB_ENV"
137+
echo LD=ld >> "$GITHUB_ENV"
138+
echo AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" >> "$GITHUB_ENV"
139+
echo RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" >> "$GITHUB_ENV"
140+
139141
- uses: haskell/ghcup-setup@v1
142+
with:
143+
ghc: ${{ matrix.ghc }}
144+
cabal: latest
140145

141146
- name: Run build
142147
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
153148
cabal update
154149
cabal test
155-
cabal bench
156-
env:
157-
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
158150
159151
freebsd:
160152
runs-on: ${{ matrix.os }}
@@ -170,14 +162,17 @@ jobs:
170162
- name: Checkout code
171163
uses: actions/checkout@v4
172164

165+
- name: Install prerequisites
166+
run: |
167+
sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
168+
173169
- uses: haskell/ghcup-setup@v1
170+
with:
171+
ghc: ${{ matrix.ghc }}
172+
cabal: latest
174173

175174
- name: Run build
176175
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
181176
cabal update
182177
cabal test
183178
cabal bench

0 commit comments

Comments
 (0)