forked from andrejbauer/agda
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (168 loc) · 5.28 KB
/
cabal.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
######################################################
## ##
## !!!! Autogenerated YAML file, do not edit !!!! ##
## ##
## Edit source in /src/github/workflows/ instead! ##
## ##
######################################################
defaults:
run:
shell: bash
jobs:
auto-cancel:
if: |
!contains(github.event.head_commit.message, '[skip ci]')
&& !contains(github.event.head_commit.message, '[ci skip]')
&& !contains(github.event.head_commit.message, '[github skip]')
&& !contains(github.event.head_commit.message, '[skip github]')
runs-on: Ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
cabal:
env:
CABAL_VER: ${{ matrix.cabal-ver || '3.10' }}
FLAGS: ${{ matrix.cabal-flags || '--enable-tests -f enable-cluster-counting'
}}
GHC_VER: ${{ matrix.ghc-ver || '9.8.1' }}
name: Cabal ${{ matrix.description }}, ${{ matrix.ghc-ver }}
needs: auto-cancel
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- if: ${{ runner.os == 'Linux' }}
name: Switch off XDG directories for cabal (Linux)
run: |
mkdir -p ~/.cabal
- id: setup-haskell
uses: haskell-actions/setup@v2
with:
cabal-update: true
cabal-version: ${{ env.CABAL-VER }}
ghc-version: ${{ env.GHC_VER }}
- name: Environment settings based on the Haskell setup
run: |
GHC_VER=$(ghc --numeric-version)
CABAL_VER=$(cabal --numeric-version)
echo "GHC_VER = ${GHC_VER}"
echo "CABAL_VER = ${CABAL_VER}"
echo "GHC_VER=${GHC_VER}" >> "${GITHUB_ENV}"
echo "CABAL_VER=${CABAL_VER}" >> "${GITHUB_ENV}"
- if: ${{ runner.os == 'Windows' }}
name: Install the ICU library (Windows)
run: |
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
pacman --noconfirm -S msys2-keyring mingw-w64-x86_64-pkgconf mingw-w64-x86_64-icu
echo "C:\msys64\mingw64\bin" | Out-File -FilePath "$env:GITHUB_PATH" -Append
shell: pwsh
- if: ${{ runner.os == 'macOS' }}
name: Set up pkg-config for the ICU library (macOS)
run: |
PKG_CONFIG_PATH=$(brew --prefix)/opt/icu4c/lib/pkgconfig
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" >> "${GITHUB_ENV}"
# # print some information to debug pkg-config
# echo "$ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
# echo "$ ls -l ${PKG_CONFIG_PATH}"
# ls -l "${PKG_CONFIG_PATH}"
# export PKG_CONFIG_PATH
# echo "$ pkg-config --modversion icu-i18n"
# pkg-config --modversion icu-i18n
- name: Determine the ICU version
run: |
ICU_VER=$(pkg-config --modversion icu-i18n)
echo "ICU_VER=${ICU_VER}"
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}"
- name: Configure the build plan
run: |
cabal configure -O0 ${FLAGS}
cabal build --dry-run
- id: cache
name: Restore cache from approximate key
uses: actions/cache@v4
with:
key: cabal.yml-${{ runner.os }}-ghc-${{ env.GHC_VER }}-cabal-${{ env.CABAL_VER
}}-${{ hashFiles('**/plan.json') }}
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
restore-keys: cabal.yml-${{ runner.os }}-ghc-${{ env.GHC_VER }}-cabal-${{
env.CABAL_VER }}-
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: Install dependencies
run: |
cabal build --only-dependencies
- name: Build Agda
run: |
cabal build
- if: ${{ matrix.doctest }}
name: Run doctest
run: |
make doc-test
strategy:
fail-fast: false
matrix:
cabal-flags:
- --enable-tests -f enable-cluster-counting
cabal-ver:
- '3.10'
description:
- Linux
doctest:
- false
ghc-ver:
- 9.8.1
- 9.6.4
- 9.4.8
- 9.2.8
- 9.0.2
- 8.10.7
- 8.8.4
- 8.6.5
include:
- cabal-flags: --disable-tests
description: Linux doctest
doctest: true
ghc-ver: 9.8.1
os: ubuntu-22.04
- cabal-flags: --enable-tests -f debug
description: Linux debug
ghc-ver: 9.8.1
os: ubuntu-22.04
- cabal-flags: --enable-tests -f enable-cluster-counting -f debug -f debug-serialisation
-f debug-parsing -c containers>=0.7 --allow-newer=containers
description: Linux containers 0.7
ghc-ver: 9.8.1
os: ubuntu-22.04
- description: macOS
ghc-ver: 9.8.1
os: macos-12
- description: Windows
ghc-ver: 9.8.1
os: windows-2022
os:
- ubuntu-22.04
timeout-minutes: 60
name: Build (cabal)
'on':
pull_request:
paths:
- .github/workflows/cabal.yml
- Agda.cabal
- Setup.hs
- src/agda-mode/**
- src/full/**
- src/main/**
- test/**.hs
push:
branches:
- master
- ci-*
- release*
paths:
- .github/workflows/cabal.yml
- Agda.cabal
- Setup.hs
- src/agda-mode/**
- src/full/**
- src/main/**
- test/**.hs