Skip to content

Commit 50b07d9

Browse files
authored
Fix i386 CI job + switch ARM jobs to self-hosted runners (#571)
* Fix i386 build * Use self-hosted runners for ARM * Simplify ARM CI jobs
1 parent 0602eab commit 50b07d9

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
cd bytestring-*/
9090
bld() { cabal build bytestring:tests --enable-tests --enable-benchmarks; }
9191
bld || bld || bld
92-
92+
9393
- name: Run Test
9494
# test broken linking on windows: https://github.com/haskell/bytestring/issues/497
9595
run: |
@@ -122,7 +122,7 @@ jobs:
122122
strategy:
123123
fail-fast: true
124124
matrix:
125-
arch: ['s390x', 'ppc64le', 'armv7', 'aarch64']
125+
arch: ['s390x', 'ppc64le']
126126
steps:
127127
- uses: actions/checkout@v3
128128
- uses: uraimo/[email protected]
@@ -187,18 +187,42 @@ jobs:
187187
- name: Install
188188
run: |
189189
apt-get update -y
190-
apt-get install -y ghc cabal-install
190+
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
191+
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
191192
- uses: actions/checkout@v1
192-
# We need to break dependency circuit between optparse-applicative,
193-
# process, unix and bytestring. Newer versions of Cabal are capable
194-
# of coming up with these automatically, but older ones need a hint.
195-
# Specifically, we need to inform Cabal that:
196-
#
197-
# * optparse-applicative doesn't use process;
198-
# * QuickCheck uses the old random package; and
199-
# * tasty doesn't use unix.
200193
- name: Test
201194
run: |
195+
source ~/.ghcup/env
202196
cabal update
203-
cabal install --dependencies-only --enable-tests --constraint 'optparse-applicative -process' --constraint 'QuickCheck +old-random' --constraint 'tasty -unix'
204197
cabal test
198+
199+
# We use github.com/haskell self-hosted runners for ARM testing.
200+
# If they become unavailable in future, put ['armv7', 'aarch64']
201+
# back to emulation jobs above.
202+
arm:
203+
needs: build
204+
runs-on: [self-hosted, Linux, ARM64]
205+
strategy:
206+
fail-fast: true
207+
matrix:
208+
arch: [arm32v7, arm64v8]
209+
steps:
210+
- uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
211+
name: Cleanup
212+
with:
213+
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
214+
215+
- name: Checkout code
216+
uses: actions/checkout@v3
217+
218+
- if: matrix.arch == 'arm32v7'
219+
uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
220+
name: Run build (arm32v7 linux)
221+
with:
222+
args: sh -c "cabal update && cabal test"
223+
224+
- if: matrix.arch == 'arm64v8'
225+
uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
226+
name: Run build (arm64v8 linux)
227+
with:
228+
args: sh -c "cabal update && cabal test"

0 commit comments

Comments
 (0)