@@ -13,73 +13,47 @@ jobs:
1313 strategy :
1414 fail-fast : false
1515 matrix :
16- os : [ubuntu-latest, macOS-latest, windows-latest ]
17- ghc : ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.5']
18- cabal : ['3.6.2 .0']
16+ os : [ubuntu-latest]
17+ ghc : ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.5', '9.2.6', '9.4.4' ]
18+ cabal : ['3.8.1 .0']
1919 include :
20- - os : ubuntu-latest
21- ghc : ' HEAD'
22- cabal : 3.6.2.0
23- - os : ubuntu-latest
24- ghc : ' recommended'
25- - os : ubuntu-latest
26- ghc : ' latest'
27- cabal : 3.6.2.0
28- exclude :
2920 - os : macOS-latest
30- ghc : ' 8.0.2'
21+ ghc : ' 9.2.6'
22+ cabal : ' 3.8.1.0'
3123 - os : macOS-latest
32- ghc : ' 8.2.2'
33- - os : macOS-latest
34- ghc : ' 8.4.4'
35- - os : macOS-latest
36- ghc : ' 8.6.5'
37- - os : macOS-latest
38- ghc : ' 8.8.4'
39- - os : macOS-latest
40- ghc : ' 9.0.2'
41- - os : windows-latest
42- ghc : ' 8.0.2'
24+ ghc : ' 9.4.4'
25+ cabal : ' 3.8.1.0'
4326 - os : windows-latest
44- ghc : ' 8.2.2'
27+ ghc : ' 9.2.6'
28+ cabal : ' 3.8.1.0'
4529 - os : windows-latest
46- ghc : ' 8.4.4'
47- - os : windows-latest
48- ghc : ' 8.6.5'
49- - os : windows-latest
50- ghc : ' 8.8.4'
51- - os : windows-latest
52- ghc : ' 9.0.2'
53-
30+ ghc : ' 9.4.4'
31+ cabal : ' 3.8.1.0'
5432 steps :
55- - uses : actions/checkout@v2
33+ - uses : actions/checkout@v3
34+
35+ - name : Workaround runner image issue
36+ if : runner.os == 'Linux'
37+ # https://github.com/actions/runner-images/issues/7061
38+ run : sudo chown -R $USER /usr/local/.ghcup
5639
5740 - name : Install dependencies (Ubuntu)
58- if : runner.os == " Linux"
41+ if : runner.os == ' Linux'
5942 run : |
60- apt-get -y update
61- apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
43+ sudo apt-get -y update
44+ sudo apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
6245
6346 - name : Install ghc/cabal
6447 run : |
6548 set -eux
66- if [ "${{ matrix.ghc }}" == 'HEAD' ] ; then
67- ghcup install ghc -u 'https://gitlab.haskell.org/api/v4/projects/1/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-unreg-validate.tar.xz?job=x86_64-linux-deb10-unreg-validate' head
68- ghcup set ghc head
69- else
70- ghcup install ghc ${{ matrix.ghc }}
71- ghcup set ghc ${{ matrix.ghc }}
72- fi
49+ ghcup install ghc --set ${{ matrix.ghc }}
7350 ghcup install cabal ${{ matrix.cabal }}
7451 shell : bash
7552
7653 - name : Build
7754 run : |
7855 set -eux
79- [ "${{ matrix.ghc }}" == 'HEAD' ] ||
80- [ "${{ matrix.ghc }}" == 'recommended' ] ||
81- [ "${{ matrix.ghc }}" == 'latest' ] ||
82- [ "$(ghc --numeric-version)" = "${{ matrix.ghc }}" ]
56+ [ "$(ghc --numeric-version)" = "${{ matrix.ghc }}" ]
8357 cabal update
8458 cabal build --enable-tests --enable-benchmarks
8559 cabal test
@@ -97,43 +71,82 @@ jobs:
9771 make all
9872 git diff --exit-code
9973
100- emulated :
101- needs : build
102- runs-on : ubuntu-latest
103- strategy :
104- fail-fast : true
105- matrix :
106- arch : ['s390x', 'ppc64le', 'armv7', 'aarch64']
107- steps :
108- - uses : actions/checkout@v2
109- - uses : uraimo/run-on-arch-action@v2.1.1
110- timeout-minutes : 60
111- with :
112- arch : ${{ matrix.arch }}
113- distro : ubuntu20.04
114- githubToken : ${{ github.token }}
115- install : |
116- apt-get update -y
117- apt-get install -y ghc libghc-quickcheck2-dev cpphs git make
118- run : |
119- ghc --version
120- ghc --make -o Main tests/filepath-tests/Test.hs -itests/ -itests/filepath-tests/ +RTS -s
121- ./Main +RTS -s
122-
123- emulated-i386 :
74+ i386 :
12475 runs-on : ubuntu-latest
12576 container :
12677 image : i386/ubuntu:bionic
12778 steps :
128- - name : install
79+ - name : Install
12980 run : |
130- apt-get update -y
131- apt-get install -y ghc libghc-quickcheck2 -dev cpphs git make
132- shell : bash
81+ apt-get update -y
82+ apt-get install -y autoconf build-essential zlib1g -dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
83+ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
13384 - uses : actions/checkout@v1
134- - name : test
85+ - name : Test
13586 run : |
136- ghc --version
137- ghc --make -o Main tests/filepath-tests/Test.hs -itests/ -itests/filepath-tests/ +RTS -s
138- ./Main +RTS -s
139- shell : bash
87+ . ~/.ghcup/env
88+ cabal update
89+ cabal test
90+
91+ # We use github.com/haskell self-hosted runners for ARM testing.
92+ # If they become unavailable in future, put ['armv7', 'aarch64']
93+ # back to emulation jobs above.
94+ arm :
95+ runs-on : [self-hosted, Linux, ARM64]
96+ strategy :
97+ fail-fast : true
98+ matrix :
99+ arch : [arm32v7, arm64v8]
100+ steps :
101+ - uses : docker://hasufell/arm64v8-ubuntu-haskell:focal
102+ name : Cleanup
103+ with :
104+ args : " find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
105+
106+ - name : Checkout code
107+ uses : actions/checkout@v3
108+
109+ - if : matrix.arch == 'arm32v7'
110+ uses : docker://hasufell/arm32v7-ubuntu-haskell:focal
111+ name : Run build (arm32v7 linux)
112+ with :
113+ args : sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"
114+
115+ - if : matrix.arch == 'arm64v8'
116+ uses : docker://hasufell/arm64v8-ubuntu-haskell:focal
117+ name : Run build (arm64v8 linux)
118+ with :
119+ args : sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"
120+
121+ darwin_arm :
122+ runs-on : ${{ matrix.os }}
123+ env :
124+ MACOSX_DEPLOYMENT_TARGET : 10.13
125+ strategy :
126+ fail-fast : false
127+ matrix :
128+ include :
129+ - os : [self-hosted, macOS, ARM64]
130+ ghc : 8.10.7
131+ - os : [self-hosted, macOS, ARM64]
132+ ghc : 9.2.6
133+ - os : [self-hosted, macOS, ARM64]
134+ ghc : 9.4.4
135+ steps :
136+ - name : Checkout code
137+ uses : actions/checkout@v3
138+
139+ - name : Run build
140+ run : |
141+ bash .github/scripts/brew.sh git coreutils llvm@11 autoconf automake
142+ export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@11/bin:$PATH"
143+ export CC="$HOME/.brew/opt/llvm@11/bin/clang"
144+ export CXX="$HOME/.brew/opt/llvm@11/bin/clang++"
145+ export LD=ld
146+ export AR="$HOME/.brew/opt/llvm@11/bin/llvm-ar"
147+ export RANLIB="$HOME/.brew/opt/llvm@11/bin/llvm-ranlib"
148+ . .github/scripts/env.sh
149+ 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
150+ cabal test
151+ env :
152+ HOMEBREW_CHANGE_ARCH_TO_ARM : 1
0 commit comments