Skip to content

Commit

Permalink
sourcehut: add ghcup support
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz committed Jun 3, 2022
1 parent df60344 commit d08d6bf
Show file tree
Hide file tree
Showing 12 changed files with 810 additions and 543 deletions.
126 changes: 66 additions & 60 deletions fixtures/all-versions.sourcehut

Large diffs are not rendered by default.

80 changes: 43 additions & 37 deletions fixtures/copy-fields-all.sourcehut
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
image: ubuntu/bionic
packages:
- gcc
- cabal-install-3.4
- libgmp-dev
- ghc-7.8.1
- ghc-7.8.2
- ghc-7.8.3
Expand Down Expand Up @@ -45,21 +45,27 @@ packages:
- ghc-8.10.2
- ghc-8.10.3
- ghc-8.10.4
- ghc-8.10.5
- ghc-8.10.6
- ghc-8.10.7
repositories:
hvr-ghc: http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main ff3aeacef6f88286
sources:
- https://example.org
tasks:
- all-prepare: |
export PATH=$PATH:/opt/cabal/bin
echo "export PATH=$PATH:/opt/cabal/bin" >> ~/.buildenv
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
export PATH=$PATH:$HOME/.ghcup/bin
echo "export PATH=$PATH:$HOME/.ghcup/bin" >> ~/.buildenv
"$HOME/.ghcup/bin/ghcup" install cabal 3.6
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.5"
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.6"
"$HOME/.ghcup/bin/ghcup" install ghc "ghc-8.10.7"
export PATH=$PATH:/opt/ghc/bin
echo "export PATH=$PATH:/opt/ghc/bin" >> ~/.buildenv
cabal update
- 7_8_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.8.1
cabal configure -w ghc-7.8.1
- 7_8_1-check: |
cd example.org
cabal check
Expand All @@ -78,7 +84,7 @@ tasks:
cabal haddock all
- 7_8_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.8.2
cabal configure -w ghc-7.8.2
- 7_8_2-check: |
cd example.org
cabal check
Expand All @@ -97,7 +103,7 @@ tasks:
cabal haddock all
- 7_8_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.8.3
cabal configure -w ghc-7.8.3
- 7_8_3-check: |
cd example.org
cabal check
Expand All @@ -116,7 +122,7 @@ tasks:
cabal haddock all
- 7_8_4-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.8.4
cabal configure -w ghc-7.8.4
- 7_8_4-check: |
cd example.org
cabal check
Expand All @@ -135,7 +141,7 @@ tasks:
cabal haddock all
- 7_10_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.10.1
cabal configure -w ghc-7.10.1
- 7_10_1-check: |
cd example.org
cabal check
Expand All @@ -154,7 +160,7 @@ tasks:
cabal haddock all
- 7_10_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.10.2
cabal configure -w ghc-7.10.2
- 7_10_2-check: |
cd example.org
cabal check
Expand All @@ -173,7 +179,7 @@ tasks:
cabal haddock all
- 7_10_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-7.10.3
cabal configure -w ghc-7.10.3
- 7_10_3-check: |
cd example.org
cabal check
Expand All @@ -192,7 +198,7 @@ tasks:
cabal haddock all
- 8_0_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.0.1
cabal configure -w ghc-8.0.1
- 8_0_1-check: |
cd example.org
cabal check
Expand All @@ -211,7 +217,7 @@ tasks:
cabal haddock all
- 8_0_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.0.2
cabal configure -w ghc-8.0.2
- 8_0_2-check: |
cd example.org
cabal check
Expand All @@ -230,7 +236,7 @@ tasks:
cabal haddock all
- 8_2_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.2.1
cabal configure -w ghc-8.2.1
- 8_2_1-check: |
cd example.org
cabal check
Expand All @@ -249,7 +255,7 @@ tasks:
cabal haddock all
- 8_2_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.2.2
cabal configure -w ghc-8.2.2
- 8_2_2-check: |
cd example.org
cabal check
Expand All @@ -268,7 +274,7 @@ tasks:
cabal haddock all
- 8_4_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.4.1
cabal configure -w ghc-8.4.1
- 8_4_1-check: |
cd example.org
cabal check
Expand All @@ -287,7 +293,7 @@ tasks:
cabal haddock all
- 8_4_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.4.2
cabal configure -w ghc-8.4.2
- 8_4_2-check: |
cd example.org
cabal check
Expand All @@ -306,7 +312,7 @@ tasks:
cabal haddock all
- 8_4_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.4.3
cabal configure -w ghc-8.4.3
- 8_4_3-check: |
cd example.org
cabal check
Expand All @@ -325,7 +331,7 @@ tasks:
cabal haddock all
- 8_4_4-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.4.4
cabal configure -w ghc-8.4.4
- 8_4_4-check: |
cd example.org
cabal check
Expand All @@ -344,7 +350,7 @@ tasks:
cabal haddock all
- 8_6_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.6.1
cabal configure -w ghc-8.6.1
- 8_6_1-check: |
cd example.org
cabal check
Expand All @@ -363,7 +369,7 @@ tasks:
cabal haddock all
- 8_6_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.6.2
cabal configure -w ghc-8.6.2
- 8_6_2-check: |
cd example.org
cabal check
Expand All @@ -382,7 +388,7 @@ tasks:
cabal haddock all
- 8_6_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.6.3
cabal configure -w ghc-8.6.3
- 8_6_3-check: |
cd example.org
cabal check
Expand All @@ -401,7 +407,7 @@ tasks:
cabal haddock all
- 8_6_4-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.6.4
cabal configure -w ghc-8.6.4
- 8_6_4-check: |
cd example.org
cabal check
Expand All @@ -420,7 +426,7 @@ tasks:
cabal haddock all
- 8_6_5-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.6.5
cabal configure -w ghc-8.6.5
- 8_6_5-check: |
cd example.org
cabal check
Expand All @@ -439,7 +445,7 @@ tasks:
cabal haddock all
- 8_8_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.8.1
cabal configure -w ghc-8.8.1
- 8_8_1-check: |
cd example.org
cabal check
Expand All @@ -458,7 +464,7 @@ tasks:
cabal haddock all
- 8_8_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.8.2
cabal configure -w ghc-8.8.2
- 8_8_2-check: |
cd example.org
cabal check
Expand All @@ -477,7 +483,7 @@ tasks:
cabal haddock all
- 8_8_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.8.3
cabal configure -w ghc-8.8.3
- 8_8_3-check: |
cd example.org
cabal check
Expand All @@ -496,7 +502,7 @@ tasks:
cabal haddock all
- 8_8_4-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.8.4
cabal configure -w ghc-8.8.4
- 8_8_4-check: |
cd example.org
cabal check
Expand All @@ -515,7 +521,7 @@ tasks:
cabal haddock all
- 8_10_1-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.1
cabal configure -w ghc-8.10.1
- 8_10_1-check: |
cd example.org
cabal check
Expand All @@ -534,7 +540,7 @@ tasks:
cabal haddock all
- 8_10_2-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.2
cabal configure -w ghc-8.10.2
- 8_10_2-check: |
cd example.org
cabal check
Expand All @@ -553,7 +559,7 @@ tasks:
cabal haddock all
- 8_10_3-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.3
cabal configure -w ghc-8.10.3
- 8_10_3-check: |
cd example.org
cabal check
Expand All @@ -572,7 +578,7 @@ tasks:
cabal haddock all
- 8_10_4-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.4
cabal configure -w ghc-8.10.4
- 8_10_4-check: |
cd example.org
cabal check
Expand All @@ -591,7 +597,7 @@ tasks:
cabal haddock all
- 8_10_5-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.5
cabal configure -w ghc-8.10.5
- 8_10_5-check: |
cd example.org
cabal check
Expand All @@ -610,7 +616,7 @@ tasks:
cabal haddock all
- 8_10_6-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.6
cabal configure -w ghc-8.10.6
- 8_10_6-check: |
cd example.org
cabal check
Expand All @@ -629,7 +635,7 @@ tasks:
cabal haddock all
- 8_10_7-prepare: |
cd example.org
cabal configure -w /opt/ghc/bin/ghc-8.10.7
cabal configure -w ghc-8.10.7
- 8_10_7-check: |
cd example.org
cabal check
Expand Down
Loading

0 comments on commit d08d6bf

Please sign in to comment.