-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (69 loc) · 2.4 KB
/
ci-matrix.yml
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
# This CI configuration is inspired by
#
# https://kodimensional.dev/github-actions
#
# It builds with a majority of the latest compiler releases from each major GHC
# revision on Linux and builds macOS and Windows against the latest GHC.
name: CI Matrix
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: ['tablegen', 'arm', 'thumb', 'ppc', 'aarch64', 'arm-xml']
ghc: ['9.4.8', '9.6.6', '9.8.2']
cabal: ['3.10.3.0']
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
# Only test macOS and Windows on the latest supported GHC versions
- os: macOS-latest
ghc: 9.4.8
- os: macOS-latest
ghc: 9.6.6
- os: windows-latest
ghc: 9.4.8
- os: windows-latest
ghc: 9.6.6
# This configuration runs out of memory
- os: windows-latest
arch: aarch64
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} dismantle-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache/restore@v4
name: Restore cabal store cache
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cp cabal.project.newbuild cabal.project
cabal v2-configure pkg:dismantle-${{ matrix.arch }} --write-ghc-environment-files=always -j1
cabal v2-build pkg:dismantle-${{ matrix.arch }}
- name: Test
if: runner.os == 'Linux'
run: |
cabal v2-test pkg:dismantle-${{ matrix.arch }}
- uses: actions/cache/save@v4
name: Save cabal store cache
# Always save the cache, even if a previous step fails. (By default, the
# `cache` action will skip saving the cache, which would require every
# subsequent CI job to rebuild the dependencies until there is a
# successful job.)
if: always()
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal