@@ -13,73 +13,43 @@ jobs:
13
13
strategy :
14
14
fail-fast : false
15
15
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']
19
19
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 :
29
20
- os : macOS-latest
30
- ghc : ' 8.0.2 '
21
+ ghc : ' 9.2.6 '
31
22
- 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'
43
24
- os : windows-latest
44
- ghc : ' 8 .2.2 '
25
+ ghc : ' 9 .2.6 '
45
26
- 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'
54
28
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
56
35
57
36
- name : Install dependencies (Ubuntu)
58
- if : runner.os == " Linux"
37
+ if : runner.os == ' Linux'
59
38
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
62
41
63
42
- name : Install ghc/cabal
64
43
run : |
65
44
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 }}
73
46
ghcup install cabal ${{ matrix.cabal }}
74
47
shell : bash
75
48
76
49
- name : Build
77
50
run : |
78
51
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 }}" ]
83
53
cabal update
84
54
cabal build --enable-tests --enable-benchmarks
85
55
cabal test
@@ -97,43 +67,84 @@ jobs:
97
67
make all
98
68
git diff --exit-code
99
69
100
- emulated :
70
+ i386 :
101
71
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
-
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 :
124
72
runs-on : ubuntu-latest
125
73
container :
126
74
image : i386/ubuntu:bionic
127
75
steps :
128
- - name : install
76
+ - name : Install
129
77
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
133
81
- uses : actions/checkout@v1
134
- - name : test
82
+ - name : Test
135
83
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