@@ -13,73 +13,43 @@ 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 '
3122 - 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'
23+ ghc : ' 9.4.4'
4324 - os : windows-latest
44- ghc : ' 8 .2.2 '
25+ ghc : ' 9 .2.6 '
4526 - 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-
27+ ghc : ' 9.4.4'
5428 steps :
55- - uses : actions/checkout@v2
29+ - uses : actions/checkout@v3
30+
31+ - name : Workaround runner image issue
32+ if : runner.os == 'Linux'
33+ # https://github.com/actions/runner-images/issues/7061
34+ run : sudo chown -R $USER /usr/local/.ghcup
5635
5736 - name : Install dependencies (Ubuntu)
58- if : runner.os == " Linux"
37+ if : runner.os == ' Linux'
5938 run : |
60- apt-get -y update
61- apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
39+ sudo apt-get -y update
40+ sudo apt-get -y install libtinfo5 libtinfo6 libncurses5 libncurses6
6241
6342 - name : Install ghc/cabal
6443 run : |
6544 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
45+ ghcup install ghc --set ${{ matrix.ghc }}
7346 ghcup install cabal ${{ matrix.cabal }}
7447 shell : bash
7548
7649 - name : Build
7750 run : |
7851 set -eux
79- [ "${{ matrix.ghc }}" == 'HEAD' ] ||
80- [ "${{ matrix.ghc }}" == 'recommended' ] ||
81- [ "${{ matrix.ghc }}" == 'latest' ] ||
82- [ "$(ghc --numeric-version)" = "${{ matrix.ghc }}" ]
52+ [ "$(ghc --numeric-version)" = "${{ matrix.ghc }}" ]
8353 cabal update
8454 cabal build --enable-tests --enable-benchmarks
8555 cabal test
@@ -97,43 +67,84 @@ jobs:
9767 make all
9868 git diff --exit-code
9969
100- emulated :
70+ i386 :
10171 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 :
12472 runs-on : ubuntu-latest
12573 container :
12674 image : i386/ubuntu:bionic
12775 steps :
128- - name : install
76+ - name : Install
12977 run : |
130- apt-get update -y
131- apt-get install -y ghc libghc-quickcheck2 -dev cpphs git make
132- shell : bash
78+ apt-get update -y
79+ apt-get install -y autoconf build-essential zlib1g -dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
80+ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
13381 - uses : actions/checkout@v1
134- - name : test
82+ - name : Test
13583 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
84+ source ~/.ghcup/env
85+ cabal update
86+ cabal test
87+
88+ # We use github.com/haskell self-hosted runners for ARM testing.
89+ # If they become unavailable in future, put ['armv7', 'aarch64']
90+ # back to emulation jobs above.
91+ arm :
92+ needs : build
93+ runs-on : [self-hosted, Linux, ARM64]
94+ strategy :
95+ fail-fast : true
96+ matrix :
97+ arch : [arm32v7, arm64v8]
98+ steps :
99+ - uses : docker://hasufell/arm64v8-ubuntu-haskell:focal
100+ name : Cleanup
101+ with :
102+ args : " find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
103+
104+ - name : Checkout code
105+ uses : actions/checkout@v3
106+
107+ - if : matrix.arch == 'arm32v7'
108+ uses : docker://hasufell/arm32v7-ubuntu-haskell:focal
109+ name : Run build (arm32v7 linux)
110+ with :
111+ args : sh -c "ghcup install ghc 9.2.2 && cabal -w ghc-9.2.2 update && cabal -w ghc-9.2.2 test"
112+
113+ - if : matrix.arch == 'arm64v8'
114+ uses : docker://hasufell/arm64v8-ubuntu-haskell:focal
115+ name : Run build (arm64v8 linux)
116+ with :
117+ args : sh -c "ghcup install ghc 9.2.2 && cabal -w ghc-9.2.2 update && cabal -w ghc-9.2.2 test"
118+
119+ darwin_arm :
120+ runs-on : ${{ matrix.os }}
121+ env :
122+ MACOSX_DEPLOYMENT_TARGET : 10.13
123+ strategy :
124+ fail-fast : false
125+ matrix :
126+ include :
127+ - os : [self-hosted, macOS, ARM64]
128+ ghc : 8.10.7
129+ - os : [self-hosted, macOS, ARM64]
130+ ghc : 9.2.6
131+ - os : [self-hosted, macOS, ARM64]
132+ ghc : 9.4.4
133+ steps :
134+ - name : Checkout code
135+ uses : actions/checkout@v3
136+
137+ - name : Run build
138+ run : |
139+ bash .github/scripts/brew.sh git coreutils llvm@11 autoconf automake
140+ export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@11/bin:$PATH"
141+ export CC="$HOME/.brew/opt/llvm@11/bin/clang"
142+ export CXX="$HOME/.brew/opt/llvm@11/bin/clang++"
143+ export LD=ld
144+ export AR="$HOME/.brew/opt/llvm@11/bin/llvm-ar"
145+ export RANLIB="$HOME/.brew/opt/llvm@11/bin/llvm-ranlib"
146+ . .github/scripts/env.sh
147+ 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
148+ cabal test
149+ env :
150+ HOMEBREW_CHANGE_ARCH_TO_ARM : 1
0 commit comments