Skip to content

Commit d867cbf

Browse files
committed
Add CI for s390x
Adapted from unicode-transforms
1 parent 96c36cb commit d867cbf

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/s390x.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: s390x
2+
on:
3+
push:
4+
branches:
5+
- master
6+
# [TODO] maybe limit it to those files which include "MachDeps.h" to spare resources
7+
pull_request: {} # Validate all PRs
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
# Emulation on s390x platform is incredibly slow and memory demanding.
15+
# It seems that any executable with GHC RTS takes at least 7-8 Gb of RAM, so we can
16+
# run `cabal` or `ghc` on their own, but cannot run them both at the same time, striking
17+
# out `cabal test`. Instead we rely on system packages and invoke `ghc --make` manually,
18+
# and even so `ghc -O` is prohibitively expensive.
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: uraimo/[email protected]
24+
timeout-minutes: 60
25+
with:
26+
arch: s390x
27+
distro: ubuntu22.04
28+
githubToken: ${{ github.token }}
29+
install: |
30+
apt-get update -y
31+
apt-get install -y \
32+
ghc libghc-quickcheck2-dev libghc-hspec-dev \
33+
libghc-getopt-generics-dev libghc-split-dev curl
34+
run: |
35+
ghc --version
36+
export LC_ALL=C.UTF-8
37+
ghc --make \
38+
-XMagicHash -XBangPatterns -XUnboxedTuples -XScopedTypeVariables \
39+
-XLambdaCase -XBlockArguments -XTupleSections \
40+
-iunicode-data/test:unicode-data/lib \
41+
-o core-test unicode-data/test/Main.hs
42+
./core-test
43+
ghc --make \
44+
-XMagicHash -XBangPatterns -XUnboxedTuples -XScopedTypeVariables \
45+
-XLambdaCase -XBlockArguments -XTupleSections \
46+
-iunicode-data-names/test:unicode-data-names/lib:unicode-data/lib \
47+
-o names-test unicode-data-names/test/Main.hs
48+
./names-test
49+
ghc --make \
50+
-XMagicHash -XBangPatterns -XUnboxedTuples -XScopedTypeVariables \
51+
-XLambdaCase -XBlockArguments -XTupleSections \
52+
-iunicode-data-scripts/test:unicode-data-scripts/lib:unicode-data/lib \
53+
-o scripts-test unicode-data-scripts/test/Main.hs
54+
./scripts-test
55+
ghc --make \
56+
-XMagicHash -XBangPatterns -XUnboxedTuples -XScopedTypeVariables \
57+
-XLambdaCase -XBlockArguments -XTupleSections \
58+
-iunicode-data-security/test:unicode-data-security/lib:unicode-data/lib \
59+
-o security-test unicode-data-security/test/Main.hs
60+
./security-test

0 commit comments

Comments
 (0)