Skip to content

Commit 0ce2ead

Browse files
committed
CI: add emulated jobs
1 parent d25a793 commit 0ce2ead

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/emulated.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: emulated
2+
on:
3+
- push
4+
- pull_request
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
# Emulation is incredibly slow and memory demanding. It seems that any
12+
# executable with GHC RTS takes at least 7-8 Gb of RAM, so we can run
13+
# `cabal` or `ghc` on their own, but cannot run them both at the same time,
14+
# striking out `cabal test`. Instead we rely on system packages and invoke
15+
# `ghc --make` manually, and even so `ghc -O` is prohibitively expensive.
16+
emulated:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
arch: ['s390x', 'ppc64le']
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: uraimo/[email protected]
25+
timeout-minutes: 60
26+
with:
27+
arch: ${{ matrix.arch }}
28+
distro: ubuntu_rolling
29+
githubToken: ${{ github.token }}
30+
install: |
31+
apt-get update -y
32+
apt-get install -y curl ghc libghc-tasty-quickcheck-dev libghc-file-embed-dev libghc-temporary-dev
33+
run: |
34+
find Codec -iname '*.hs' -type f -exec sed -i.bck 's/"os-string"//g' {} \;
35+
curl -s https://hackage.haskell.org/package/os-string-2.0.3/os-string-2.0.3.tar.gz | tar xz
36+
ghc --version
37+
ghc --make -itest:os-string-2.0.3 -o Main test/Properties.hs +RTS -s
38+
./Main +RTS -s

0 commit comments

Comments
 (0)