Skip to content

Commit aa49a9f

Browse files
committed
Merge branch 'ghcup-setup'
2 parents 4b5efed + 5d80fb0 commit aa49a9f

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

.github/workflows/test.yaml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8']
1818
cabal: ['3.8.1.0']
1919
include:
20-
- os: macOS-12
20+
- os: macOS-13
2121
ghc: '9.4'
2222
cabal: '3.8.1.0'
23-
- os: macOS-12
23+
- os: macOS-13
2424
ghc: '9.6'
2525
cabal: '3.8.1.0'
2626
- os: windows-latest
@@ -36,13 +36,16 @@ jobs:
3636
if: runner.os == 'Linux'
3737
run: |
3838
sudo apt-get -y update
39-
sudo apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
39+
sudo apt-get -y install libtinfo6 libncurses6
40+
41+
- name: Install GHCup
42+
uses: haskell/ghcup-setup@v1
4043

4144
- name: Install ghc/cabal
4245
run: |
4346
set -eux
4447
ghcup install ghc --set ${{ matrix.ghc }}
45-
ghcup install cabal ${{ matrix.cabal }}
48+
ghcup install cabal --set ${{ matrix.cabal }}
4649
shell: bash
4750

4851
- name: Build
@@ -59,21 +62,14 @@ jobs:
5962

6063
i386:
6164
runs-on: ubuntu-latest
62-
container:
63-
image: i386/ubuntu:bionic
6465
steps:
65-
- name: Install
66-
run: |
67-
apt-get update -y
68-
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
69-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
70-
- uses: actions/checkout@v1
71-
- name: Test
72-
run: |
73-
. ~/.ghcup/env
74-
cabal update
75-
cabal test
76-
cabal bench
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
69+
- name: Run build (32 bit linux)
70+
uses: docker://hasufell/i386-alpine-haskell:3.12
71+
with:
72+
args: sh -c "cabal update && cabal test && cabal bench"
7773

7874
# We use github.com/haskell self-hosted runners for ARM testing.
7975
# If they become unavailable in future, put ['armv7', 'aarch64']
@@ -123,6 +119,9 @@ jobs:
123119
- name: Checkout code
124120
uses: actions/checkout@v4
125121

122+
- name: Install GHCup
123+
uses: haskell/ghcup-setup@v1
124+
126125
- name: Run build
127126
run: |
128127
bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
@@ -132,8 +131,7 @@ jobs:
132131
export LD=ld
133132
export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar"
134133
export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib"
135-
. .github/scripts/env.sh
136-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_GHC_VERSION=${{ matrix.ghc }} BOOTSTRAP_HASKELL_ADJUST_BASHRC=yes sh
134+
cabal update
137135
cabal test
138136
cabal bench
139137
env:
@@ -153,11 +151,16 @@ jobs:
153151
- name: Checkout code
154152
uses: actions/checkout@v4
155153

154+
- name: Install prerequisites
155+
run: |
156+
sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake autoconf
157+
158+
- name: Install GHCup
159+
uses: haskell/ghcup-setup@v1
160+
156161
- name: Run build
157162
run: |
158-
pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
159-
. .github/scripts/env.sh
160-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_GHC_VERSION=${{ matrix.ghc }} BOOTSTRAP_HASKELL_ADJUST_BASHRC=yes sh
163+
cabal update
161164
cabal test
162165
cabal bench
163166
@@ -174,7 +177,7 @@ jobs:
174177
arch: ['s390x', 'ppc64le']
175178
steps:
176179
- uses: actions/checkout@v4
177-
- uses: uraimo/run-on-arch-action@v2.7.2
180+
- uses: uraimo/run-on-arch-action@v2.8.1
178181
timeout-minutes: 60
179182
with:
180183
arch: ${{ matrix.arch }}

0 commit comments

Comments
 (0)