Skip to content

Commit d08d6bf

Browse files
committed
sourcehut: add ghcup support
1 parent df60344 commit d08d6bf

12 files changed

+810
-543
lines changed

fixtures/all-versions.sourcehut

Lines changed: 66 additions & 60 deletions
Large diffs are not rendered by default.

fixtures/copy-fields-all.sourcehut

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
image: ubuntu/bionic
1717
packages:
1818
- gcc
19-
- cabal-install-3.4
19+
- libgmp-dev
2020
- ghc-7.8.1
2121
- ghc-7.8.2
2222
- ghc-7.8.3
@@ -45,21 +45,27 @@ packages:
4545
- ghc-8.10.2
4646
- ghc-8.10.3
4747
- ghc-8.10.4
48-
- ghc-8.10.5
49-
- ghc-8.10.6
50-
- ghc-8.10.7
5148
repositories:
5249
hvr-ghc: http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main ff3aeacef6f88286
5350
sources:
5451
- https://example.org
5552
tasks:
5653
- all-prepare: |
57-
export PATH=$PATH:/opt/cabal/bin
58-
echo "export PATH=$PATH:/opt/cabal/bin" >> ~/.buildenv
54+
mkdir -p "$HOME/.ghcup/bin"
55+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
56+
chmod a+x "$HOME/.ghcup/bin/ghcup"
57+
export PATH=$PATH:$HOME/.ghcup/bin
58+
echo "export PATH=$PATH:$HOME/.ghcup/bin" >> ~/.buildenv
59+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6
60+
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.5"
61+
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.6"
62+
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.7"
63+
export PATH=$PATH:/opt/ghc/bin
64+
echo "export PATH=$PATH:/opt/ghc/bin" >> ~/.buildenv
5965
cabal update
6066
- 7_8_1-prepare: |
6167
cd example.org
62-
cabal configure -w /opt/ghc/bin/ghc-7.8.1
68+
cabal configure -w ghc-7.8.1
6369
- 7_8_1-check: |
6470
cd example.org
6571
cabal check
@@ -78,7 +84,7 @@ tasks:
7884
cabal haddock all
7985
- 7_8_2-prepare: |
8086
cd example.org
81-
cabal configure -w /opt/ghc/bin/ghc-7.8.2
87+
cabal configure -w ghc-7.8.2
8288
- 7_8_2-check: |
8389
cd example.org
8490
cabal check
@@ -97,7 +103,7 @@ tasks:
97103
cabal haddock all
98104
- 7_8_3-prepare: |
99105
cd example.org
100-
cabal configure -w /opt/ghc/bin/ghc-7.8.3
106+
cabal configure -w ghc-7.8.3
101107
- 7_8_3-check: |
102108
cd example.org
103109
cabal check
@@ -116,7 +122,7 @@ tasks:
116122
cabal haddock all
117123
- 7_8_4-prepare: |
118124
cd example.org
119-
cabal configure -w /opt/ghc/bin/ghc-7.8.4
125+
cabal configure -w ghc-7.8.4
120126
- 7_8_4-check: |
121127
cd example.org
122128
cabal check
@@ -135,7 +141,7 @@ tasks:
135141
cabal haddock all
136142
- 7_10_1-prepare: |
137143
cd example.org
138-
cabal configure -w /opt/ghc/bin/ghc-7.10.1
144+
cabal configure -w ghc-7.10.1
139145
- 7_10_1-check: |
140146
cd example.org
141147
cabal check
@@ -154,7 +160,7 @@ tasks:
154160
cabal haddock all
155161
- 7_10_2-prepare: |
156162
cd example.org
157-
cabal configure -w /opt/ghc/bin/ghc-7.10.2
163+
cabal configure -w ghc-7.10.2
158164
- 7_10_2-check: |
159165
cd example.org
160166
cabal check
@@ -173,7 +179,7 @@ tasks:
173179
cabal haddock all
174180
- 7_10_3-prepare: |
175181
cd example.org
176-
cabal configure -w /opt/ghc/bin/ghc-7.10.3
182+
cabal configure -w ghc-7.10.3
177183
- 7_10_3-check: |
178184
cd example.org
179185
cabal check
@@ -192,7 +198,7 @@ tasks:
192198
cabal haddock all
193199
- 8_0_1-prepare: |
194200
cd example.org
195-
cabal configure -w /opt/ghc/bin/ghc-8.0.1
201+
cabal configure -w ghc-8.0.1
196202
- 8_0_1-check: |
197203
cd example.org
198204
cabal check
@@ -211,7 +217,7 @@ tasks:
211217
cabal haddock all
212218
- 8_0_2-prepare: |
213219
cd example.org
214-
cabal configure -w /opt/ghc/bin/ghc-8.0.2
220+
cabal configure -w ghc-8.0.2
215221
- 8_0_2-check: |
216222
cd example.org
217223
cabal check
@@ -230,7 +236,7 @@ tasks:
230236
cabal haddock all
231237
- 8_2_1-prepare: |
232238
cd example.org
233-
cabal configure -w /opt/ghc/bin/ghc-8.2.1
239+
cabal configure -w ghc-8.2.1
234240
- 8_2_1-check: |
235241
cd example.org
236242
cabal check
@@ -249,7 +255,7 @@ tasks:
249255
cabal haddock all
250256
- 8_2_2-prepare: |
251257
cd example.org
252-
cabal configure -w /opt/ghc/bin/ghc-8.2.2
258+
cabal configure -w ghc-8.2.2
253259
- 8_2_2-check: |
254260
cd example.org
255261
cabal check
@@ -268,7 +274,7 @@ tasks:
268274
cabal haddock all
269275
- 8_4_1-prepare: |
270276
cd example.org
271-
cabal configure -w /opt/ghc/bin/ghc-8.4.1
277+
cabal configure -w ghc-8.4.1
272278
- 8_4_1-check: |
273279
cd example.org
274280
cabal check
@@ -287,7 +293,7 @@ tasks:
287293
cabal haddock all
288294
- 8_4_2-prepare: |
289295
cd example.org
290-
cabal configure -w /opt/ghc/bin/ghc-8.4.2
296+
cabal configure -w ghc-8.4.2
291297
- 8_4_2-check: |
292298
cd example.org
293299
cabal check
@@ -306,7 +312,7 @@ tasks:
306312
cabal haddock all
307313
- 8_4_3-prepare: |
308314
cd example.org
309-
cabal configure -w /opt/ghc/bin/ghc-8.4.3
315+
cabal configure -w ghc-8.4.3
310316
- 8_4_3-check: |
311317
cd example.org
312318
cabal check
@@ -325,7 +331,7 @@ tasks:
325331
cabal haddock all
326332
- 8_4_4-prepare: |
327333
cd example.org
328-
cabal configure -w /opt/ghc/bin/ghc-8.4.4
334+
cabal configure -w ghc-8.4.4
329335
- 8_4_4-check: |
330336
cd example.org
331337
cabal check
@@ -344,7 +350,7 @@ tasks:
344350
cabal haddock all
345351
- 8_6_1-prepare: |
346352
cd example.org
347-
cabal configure -w /opt/ghc/bin/ghc-8.6.1
353+
cabal configure -w ghc-8.6.1
348354
- 8_6_1-check: |
349355
cd example.org
350356
cabal check
@@ -363,7 +369,7 @@ tasks:
363369
cabal haddock all
364370
- 8_6_2-prepare: |
365371
cd example.org
366-
cabal configure -w /opt/ghc/bin/ghc-8.6.2
372+
cabal configure -w ghc-8.6.2
367373
- 8_6_2-check: |
368374
cd example.org
369375
cabal check
@@ -382,7 +388,7 @@ tasks:
382388
cabal haddock all
383389
- 8_6_3-prepare: |
384390
cd example.org
385-
cabal configure -w /opt/ghc/bin/ghc-8.6.3
391+
cabal configure -w ghc-8.6.3
386392
- 8_6_3-check: |
387393
cd example.org
388394
cabal check
@@ -401,7 +407,7 @@ tasks:
401407
cabal haddock all
402408
- 8_6_4-prepare: |
403409
cd example.org
404-
cabal configure -w /opt/ghc/bin/ghc-8.6.4
410+
cabal configure -w ghc-8.6.4
405411
- 8_6_4-check: |
406412
cd example.org
407413
cabal check
@@ -420,7 +426,7 @@ tasks:
420426
cabal haddock all
421427
- 8_6_5-prepare: |
422428
cd example.org
423-
cabal configure -w /opt/ghc/bin/ghc-8.6.5
429+
cabal configure -w ghc-8.6.5
424430
- 8_6_5-check: |
425431
cd example.org
426432
cabal check
@@ -439,7 +445,7 @@ tasks:
439445
cabal haddock all
440446
- 8_8_1-prepare: |
441447
cd example.org
442-
cabal configure -w /opt/ghc/bin/ghc-8.8.1
448+
cabal configure -w ghc-8.8.1
443449
- 8_8_1-check: |
444450
cd example.org
445451
cabal check
@@ -458,7 +464,7 @@ tasks:
458464
cabal haddock all
459465
- 8_8_2-prepare: |
460466
cd example.org
461-
cabal configure -w /opt/ghc/bin/ghc-8.8.2
467+
cabal configure -w ghc-8.8.2
462468
- 8_8_2-check: |
463469
cd example.org
464470
cabal check
@@ -477,7 +483,7 @@ tasks:
477483
cabal haddock all
478484
- 8_8_3-prepare: |
479485
cd example.org
480-
cabal configure -w /opt/ghc/bin/ghc-8.8.3
486+
cabal configure -w ghc-8.8.3
481487
- 8_8_3-check: |
482488
cd example.org
483489
cabal check
@@ -496,7 +502,7 @@ tasks:
496502
cabal haddock all
497503
- 8_8_4-prepare: |
498504
cd example.org
499-
cabal configure -w /opt/ghc/bin/ghc-8.8.4
505+
cabal configure -w ghc-8.8.4
500506
- 8_8_4-check: |
501507
cd example.org
502508
cabal check
@@ -515,7 +521,7 @@ tasks:
515521
cabal haddock all
516522
- 8_10_1-prepare: |
517523
cd example.org
518-
cabal configure -w /opt/ghc/bin/ghc-8.10.1
524+
cabal configure -w ghc-8.10.1
519525
- 8_10_1-check: |
520526
cd example.org
521527
cabal check
@@ -534,7 +540,7 @@ tasks:
534540
cabal haddock all
535541
- 8_10_2-prepare: |
536542
cd example.org
537-
cabal configure -w /opt/ghc/bin/ghc-8.10.2
543+
cabal configure -w ghc-8.10.2
538544
- 8_10_2-check: |
539545
cd example.org
540546
cabal check
@@ -553,7 +559,7 @@ tasks:
553559
cabal haddock all
554560
- 8_10_3-prepare: |
555561
cd example.org
556-
cabal configure -w /opt/ghc/bin/ghc-8.10.3
562+
cabal configure -w ghc-8.10.3
557563
- 8_10_3-check: |
558564
cd example.org
559565
cabal check
@@ -572,7 +578,7 @@ tasks:
572578
cabal haddock all
573579
- 8_10_4-prepare: |
574580
cd example.org
575-
cabal configure -w /opt/ghc/bin/ghc-8.10.4
581+
cabal configure -w ghc-8.10.4
576582
- 8_10_4-check: |
577583
cd example.org
578584
cabal check
@@ -591,7 +597,7 @@ tasks:
591597
cabal haddock all
592598
- 8_10_5-prepare: |
593599
cd example.org
594-
cabal configure -w /opt/ghc/bin/ghc-8.10.5
600+
cabal configure -w ghc-8.10.5
595601
- 8_10_5-check: |
596602
cd example.org
597603
cabal check
@@ -610,7 +616,7 @@ tasks:
610616
cabal haddock all
611617
- 8_10_6-prepare: |
612618
cd example.org
613-
cabal configure -w /opt/ghc/bin/ghc-8.10.6
619+
cabal configure -w ghc-8.10.6
614620
- 8_10_6-check: |
615621
cd example.org
616622
cabal check
@@ -629,7 +635,7 @@ tasks:
629635
cabal haddock all
630636
- 8_10_7-prepare: |
631637
cd example.org
632-
cabal configure -w /opt/ghc/bin/ghc-8.10.7
638+
cabal configure -w ghc-8.10.7
633639
- 8_10_7-check: |
634640
cd example.org
635641
cabal check

0 commit comments

Comments
 (0)