forked from agda/agda
-
Notifications
You must be signed in to change notification settings - Fork 0
287 lines (285 loc) · 9.64 KB
/
test.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
######################################################
## ##
## !!!! Autogenerated YAML file, do not edit !!!! ##
## ##
## Edit source in /src/github/workflows/ instead! ##
## ##
######################################################
env:
AGDA_TESTS_OPTIONS: -j${PARALLEL_TESTS} --hide-successes
BUILD_DIR: dist
GHC_VER: 9.4.3
PARALLEL_TESTS: 2
STACK: stack --system-ghc
STACK_VER: 2.9.1
TASTY_ANSI_TRICKS: 'false'
jobs:
build:
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-22.04
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
with:
enable-stack: true
ghc-version: ${{ env.GHC_VER }}
stack-version: ${{ env.STACK_VER }}
- name: Copy stack-${{ env.GHC_VER}}.yaml to stack.yaml
run: cp stack-${{ env.GHC_VER }}.yaml stack.yaml
- id: cache
name: Cache dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles('stack.yaml')
}}
path: ~/.stack
- name: Install dependencies for Agda and its test suites
run: make install-deps
- name: Build Agda
run: make BUILD_DIR="${BUILD_DIR}" install-bin
- name: Run tests for the size solver
run: |
export PATH=${HOME}/.local/bin:${PATH}
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" size-solver-test
- name: Pack artifacts
run: |
strip ${BUILD_DIR}/build/agda-tests/agda-tests \
${BUILD_DIR}/build/agda/agda \
${BUILD_DIR}/build/agda-mode/agda-mode
tar --use-compress-program zstd -cvf dist.tzst \
${BUILD_DIR}/build/agda-tests/agda-tests \
${BUILD_DIR}/build/agda/agda \
${BUILD_DIR}/build/agda-mode/agda-mode
tar --use-compress-program zstd -cvf stack-work.tzst .stack-work stack.yaml stack.yaml.lock
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: agda-${{ runner.os }}-${{ github.sha }}
path: |
dist.tzst
stack-work.tzst
retention-days: 1
cubical:
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
with:
enable-stack: true
ghc-version: ${{ env.GHC_VER }}
stack-version: ${{ env.STACK_VER }}
- uses: actions/download-artifact@v3
with:
name: agda-${{ runner.os }}-${{ github.sha }}
- name: Unpack artifacts
run: |
tar --use-compress-program zstd -xvf dist.tzst
tar --use-compress-program zstd -xvf stack-work.tzst
- id: cache
name: Cache dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles('stack.yaml')
}}
path: ~/.stack
- name: Cubical library test
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" cubical-test
- name: Successful tests using the cubical library
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" cubical-succeed
interaction-latex-html:
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
with:
enable-stack: true
ghc-version: ${{ env.GHC_VER }}
stack-version: ${{ env.STACK_VER }}
- uses: actions/download-artifact@v3
with:
name: agda-${{ runner.os }}-${{ github.sha }}
- name: Unpack artifacts
run: |
tar --use-compress-program zstd -xvf dist.tzst
tar --use-compress-program zstd -xvf stack-work.tzst
- id: cache
name: Cache dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles('stack.yaml')
}}
path: ~/.stack
- name: Install Tex Live and Emacs
run: |
sudo apt-get update
sudo apt-get install texlive-binaries ${APT_GET_OPTS}
sudo apt-get install emacs-nox ${APT_GET_OPTS}
- name: Suite of tests for the LaTeX and HTML backends
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" DONT_RUN_LATEX=Y latex-html-test
- name: Testing the Emacs mode
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" testing-emacs-mode
- name: Suite of interaction tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" interaction
stdlib-test:
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
with:
enable-stack: true
ghc-version: ${{ env.GHC_VER }}
stack-version: ${{ env.STACK_VER }}
- uses: actions/download-artifact@v3
with:
name: agda-${{ runner.os }}-${{ github.sha }}
- name: Unpack artifacts
run: |
tar --use-compress-program zstd -xvf dist.tzst
tar --use-compress-program zstd -xvf stack-work.tzst
- id: cache
name: Cache dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles('stack.yaml')
}}
path: ~/.stack
- name: Standard library test
run: |
# ASR (2021-01-17). `cabal update` is required due to #5138.
# We should also use `stack` in this test.
cabal update
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-test
- name: Standard library compiler tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-compiler-test
- name: Successful tests using the standard library
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-succeed
- name: Interaction tests using the standard library
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-interaction
test:
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
with:
enable-stack: true
ghc-version: ${{ env.GHC_VER }}
stack-version: ${{ env.STACK_VER }}
- uses: actions/download-artifact@v3
with:
name: agda-${{ runner.os }}-${{ github.sha }}
- name: Unpack artifacts
run: |
tar --use-compress-program zstd -xvf dist.tzst
tar --use-compress-program zstd -xvf stack-work.tzst
- id: cache
name: Cache dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles('stack.yaml')
}}
path: ~/.stack
- name: Suite of tests for bugs
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" bugs
- name: 'Suite of successful tests: mini-library Common'
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" common
- name: Suite of successful tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" succeed
- name: Suite of failing tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" fail
- name: User manual (test)
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" user-manual-test
- name: Suite of examples
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" examples
- name: Suite of interactive tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" interactive
- name: Successful tests using Agda as a Haskell library
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" api-test
- name: Internal test suite
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" internal-tests
- name: Benchmark
run: |
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" benchmark-without-logs
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" benchmark-summary
- name: Compiler tests
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" compiler-test
name: Build, Test, and Benchmark
'on':
pull_request:
paths:
- '**'
- '!.github/**'
- .github/workflows/test.yml
- '!src/github/**'
- src/github/workflows/test.yml
- '!src/agda-bisect/**'
- '!src/fix-whitespace/**'
- '!src/hs-tags/**'
- '!src/release-tools/**'
- '!.travis'
- '!macros/**'
- '!notes/**'
- '!.mailmap'
- '!.gitignore'
- '!.hlint.yaml'
- '!.travis.yml'
- '!CHANGELOG.md'
- '!HACKING.md'
- '!LICENSE'
- '!README.md'
- '!fix-whitespace.yaml'
- '!hie*.yaml'
- '!stack-*.yaml'
- '!touchup.sh'
push:
branches:
- master
- ci-*
- release*
paths:
- '**'
- '!.github/**'
- .github/workflows/test.yml
- '!src/github/**'
- src/github/workflows/test.yml
- '!src/agda-bisect/**'
- '!src/fix-whitespace/**'
- '!src/hs-tags/**'
- '!src/release-tools/**'
- '!.travis'
- '!macros/**'
- '!notes/**'
- '!.mailmap'
- '!.gitignore'
- '!.hlint.yaml'
- '!.travis.yml'
- '!CHANGELOG.md'
- '!HACKING.md'
- '!LICENSE'
- '!README.md'
- '!fix-whitespace.yaml'
- '!hie*.yaml'
- '!stack-*.yaml'
- '!touchup.sh'
workflow_dispatch: null