-
Notifications
You must be signed in to change notification settings - Fork 146
211 lines (194 loc) · 6.7 KB
/
ci.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
name: CI
# Trigger the workflow on push or pull request
on: [ push, pull_request ]
jobs:
# ------------------------------
# Basic linting requirements for new commits
build-check-src:
name: "Check: code cleanliness"
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Check tabs and whitespace
shell: bash
run: ".github/workflows/check_whitespace.sh"
build-check-testsuite:
name: "Check: testsuite lint"
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Check CONFDIR
run: |
cd testsuite
../.github/workflows/check_confdir.py
../.github/workflows/check_symlinks.py
# ------------------------------
# Builds for release, using a reliable and stable version of GHC
build-and-test-ubuntu:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
fail-fast: false
name: "Build/Test: ${{ matrix.os }}"
uses: ./.github/workflows/build-and-test-ubuntu.yml
with:
os: ${{ matrix.os }}
ghc_version: 9.6.6
hls_version: 2.9.0.1
secrets: inherit
build-and-test-macos:
strategy:
matrix:
os: [ macos-13, macos-14, macos-15 ]
fail-fast: false
name: "Build/Test: ${{ matrix.os }}"
uses: ./.github/workflows/build-and-test-macos.yml
with:
os: ${{ matrix.os }}
ghc_version: 9.6.6
hls_version: 2.9.0.1
secrets: inherit
# ------------------------------
# Tests using other recent versions of GHC, particularly newer ones,
# in anticipation of upgrading the release builds to that version
build-and-test-ghc-ubuntu:
strategy:
matrix:
ghc:
- version: 9.4.8
hls: 2.7.0.0
- version: 9.8.2
hls: 2.7.0.0
- version: 9.10.1
hls:
name: "Build/Test: GHC Ubuntu"
uses: ./.github/workflows/build-and-test-ubuntu.yml
with:
os: ubuntu-22.04
ghc_version: ${{ matrix.ghc.version }}
hls_version: ${{ matrix.ghc.hls }}
secrets: inherit
build-and-test-ghc-macos:
strategy:
matrix:
ghc:
- version: 9.4.8
hls: 2.7.0.0
- version: 9.8.2
hls: 2.7.0.0
- version: 9.10.1
hls:
name: "Build/Test: GHC macOS"
uses: ./.github/workflows/build-and-test-macos.yml
with:
os: macos-14
ghc_version: ${{ matrix.ghc.version }}
hls_version: ${{ matrix.ghc.hls }}
secrets: inherit
# ------------------------------
# Test the building of documentation
build-doc-ubuntu:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
fail-fast: false
name: "Build doc: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: "sudo .github/workflows/install_dependencies_doc_ubuntu.sh"
- name: Build
run: |
make -j3 install-doc
tar czf inst.tar.gz inst
# The next two actions upload the PDFs as an artifact that can be downloaded.
# We provide two versions: one for release packaging and one for users.
# This is because the GitHub download will provide the artifact as a zip-file,
# even if the artifact itself is just one file:
# https://github.com/actions/upload-artifact/issues/3
# https://github.com/actions/upload-artifact/issues/14
# It is inconvenient for users to access PDFs inside a tarfile inside a zipfile,
# therefore we provide an option without the tarfile layer.
- name: Upload artifact
# This artifact (PDFs inside inst.tar.gz inside artifact.zip) is for release packaging.
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} build doc
path: inst.tar.gz
- name: Upload doc not tar
# This artifact (PDFs inside artifact.zip) is for viewing the built documents.
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-doc-not-tar
path: inst/doc
build-doc-macOS:
strategy:
matrix:
os: [ macos-13, macos-14, macos-15 ]
fail-fast: false
name: "Build doc: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: ".github/workflows/install_dependencies_doc_macos.sh"
- name: Build
run: |
# Brew install of mactex doesn't update the path until a new shell is opened
export PATH=/Library/TeX/texbin/:$PATH
make -j3 install-doc
tar czf inst.tar.gz inst
# The next two actions upload the PDFs as an artifact that can be downloaded.
# We provide two versions: one for release packaging and one for users.
# This is because the GitHub download will provide the artifact as a zip-file,
# even if the artifact itself is just one file:
# https://github.com/actions/upload-artifact/issues/3
# https://github.com/actions/upload-artifact/issues/14
# It is inconvenient for users to access PDFs inside a tarfile inside a zipfile,
# therefore we provide an option without the tarfile layer.
- name: Upload artifact
# This artifact (PDFs inside inst.tar.gz inside artifact.zip) is for release packaging.
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} build doc
path: inst.tar.gz
- name: Upload doc not tar
# This artifact (PDFs inside artifact.zip) is for viewing the built documents.
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-doc-not-tar
path: inst/doc
# ------------------------------
# Build platform-generic documents for releases
build-releasenotes-ubuntu:
# Release Notes only need to be built once, so we build on recent
# Ubuntu, not Mac OS. Later, the release script will copy the
# generated release notes to all release tarballs.
strategy:
matrix:
os: [ ubuntu-22.04 ]
fail-fast: false
name: "Build releasenotes: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: "sudo .github/workflows/install_dependencies_releasenotes_ubuntu.sh"
- name: Build
run: |
make install-release
tar czf inst.tar.gz inst
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} releasenotes
path: inst.tar.gz