-
Notifications
You must be signed in to change notification settings - Fork 32
134 lines (125 loc) · 3.55 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Haskell CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.1']
cabal: ['3.6.2.0']
include:
- os: ubuntu-latest
ghc: 'HEAD'
experimental: true
- os: ubuntu-latest
ghc: 'recommended'
experimental: true
- os: ubuntu-latest
ghc: 'latest'
experimental: true
exclude:
- os: macOS-latest
ghc: '8.0.2'
- os: macOS-latest
ghc: '8.2.2'
- os: macOS-latest
ghc: '8.4.4'
- os: macOS-latest
ghc: '8.6.5'
- os: macOS-latest
ghc: '8.8.4'
- os: macOS-latest
ghc: '9.0.2'
- os: windows-latest
ghc: '8.0.2'
- os: windows-latest
ghc: '8.2.2'
- os: windows-latest
ghc: '8.4.4'
- os: windows-latest
ghc: '8.6.5'
- os: windows-latest
ghc: '8.8.4'
- os: windows-latest
ghc: '9.0.2'
steps:
- uses: actions/checkout@v2
- name: Install ghc/cabal
run: |
set -eux
if [ "${{ matrix.ghc }}" == 'HEAD' ] ; then
ghcup install ghc -u 'https://gitlab.haskell.org/api/v4/projects/1/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux.tar.xz?job=validate-x86_64-linux-deb10-hadrian' head
ghcup set ghc head
else
ghcup install ghc ${{ matrix.ghc }}
ghcup set ghc ${{ matrix.ghc }}
fi
ghcup install cabal ${{ matrix.cabal }}
shell: bash
- name: Build
run: |
set -eux
[ "${{ matrix.ghc }}" == 'HEAD' ] ||
[ "${{ matrix.ghc }}" == 'recommended' ] ||
[ "${{ matrix.ghc }}" == 'latest' ] ||
[ "$(ghc --numeric-version)" = "${{ matrix.ghc }}" ]
cabal update
cabal build --enable-tests --enable-benchmarks
cabal test
cabal haddock
cabal check
cabal sdist
shell: bash
- if: matrix.os == 'ubuntu-latest'
name: make all
run: |
set -eux
export "PATH=$HOME/.cabal/bin:$PATH"
cabal install --overwrite-policy=always --install-method=copy cpphs
make all
git diff --exit-code
emulated:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
arch: ['s390x', 'ppc64le', 'armv7', 'aarch64']
steps:
- uses: actions/checkout@v2
- uses: uraimo/[email protected]
timeout-minutes: 60
with:
arch: ${{ matrix.arch }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update -y
apt-get install -y ghc libghc-quickcheck2-dev cpphs git make
run: |
ghc --version
ghc --make -o Main tests/Test.hs -itests/ +RTS -s
./Main +RTS -s
emulated-i386:
runs-on: ubuntu-latest
container:
image: i386/ubuntu:bionic
steps:
- name: install
run: |
apt-get update -y
apt-get install -y ghc libghc-quickcheck2-dev cpphs git make
shell: bash
- uses: actions/checkout@v1
- name: test
run: |
ghc --version
ghc --make -o Main tests/Test.hs -itests/ +RTS -s
./Main +RTS -s
shell: bash