Skip to content

Commit 3e4c282

Browse files
committed
Use ghcup-setup in CI
1 parent 2130316 commit 3e4c282

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

.github/workflows/test.yaml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8-
schedule:
9-
- cron: '0 2 * * *'
108

119
jobs:
1210
build:
@@ -37,13 +35,16 @@ jobs:
3735
if: runner.os == 'Linux'
3836
run: |
3937
sudo apt-get -y update
40-
sudo apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
38+
sudo apt-get -y install libtinfo6 libncurses6
39+
40+
- name: Install GHCup
41+
uses: haskell/ghcup-setup@v1
4142

4243
- name: Install ghc/cabal
4344
run: |
4445
set -eux
4546
ghcup install ghc --set ${{ matrix.ghc }}
46-
ghcup install cabal ${{ matrix.cabal }}
47+
ghcup install cabal --set latest
4748
shell: bash
4849

4950
- name: Build
@@ -59,20 +60,14 @@ jobs:
5960

6061
i386:
6162
runs-on: ubuntu-latest
62-
container:
63-
image: i386/ubuntu:bionic
6463
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
64+
- name: Checkout code
65+
uses: actions/checkout@v4
66+
67+
- name: Run build (32 bit linux)
68+
uses: docker://hasufell/i386-alpine-haskell:3.12
69+
with:
70+
args: sh -c "cabal update && cabal test"
7671

7772
# We use github.com/haskell self-hosted runners for ARM testing.
7873
# If they become unavailable in future, put ['armv7', 'aarch64']
@@ -122,6 +117,9 @@ jobs:
122117
- name: Checkout code
123118
uses: actions/checkout@v4
124119

120+
- name: Install GHCup
121+
uses: haskell/ghcup-setup@v1
122+
125123
- name: Run build
126124
run: |
127125
bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake
@@ -131,8 +129,7 @@ jobs:
131129
export LD=ld
132130
export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar"
133131
export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib"
134-
. .github/scripts/env.sh
135-
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
132+
cabal update
136133
cabal test
137134
env:
138135
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
@@ -151,10 +148,14 @@ jobs:
151148
- name: Checkout code
152149
uses: actions/checkout@v4
153150

151+
- name: Install prerequisites
152+
run: |
153+
sudo pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake autoconf
154+
155+
- name: Install GHCup
156+
uses: haskell/ghcup-setup@v1
157+
154158
- name: Run build
155159
run: |
156-
pkg install -y curl gcc gmp gmake ncurses perl5 libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14
157-
. .github/scripts/env.sh
158-
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
160+
cabal update
159161
cabal test
160-

0 commit comments

Comments
 (0)