Skip to content

Commit

Permalink
Add ghc-head to the github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Jun 10, 2024
1 parent e15a95f commit 4831f05
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/packcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# ------------------------------------------------------------------------
CABAL_CHECK_RELAX: y
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
CABAL_PROJECT: "cabal.project"
CABAL_PROJECT: ${{ matrix.cabal_project }}

# ------------------------------------------------------------------------
# Where to find the required tools
Expand Down Expand Up @@ -110,19 +110,29 @@ jobs:
# Adding any element to the list will increase the number of matrix
# elements proportional to the cross product.
include:

- name: ci
command: cabal
runner: ubuntu-latest
ghc_version: head
cabal_project: cabal.project.ghc-head

- name: ci
command: cabal
runner: ubuntu-latest
ghc_version: 9.8.1
cabal_project: cabal.project

- name: ci
command: stack
runner: ubuntu-latest
cabal_project: cabal.project

- name: ci
ghc_version: 9.8.1
command: cabal
runner: macos-latest
cabal_project: cabal.project

- name: ci
command: hlint
Expand Down
18 changes: 18 additions & 0 deletions cabal.project.ghc-head
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- See head.hackage:
-- info at https://ghc.gitlab.haskell.org/head.hackage/
-- source at https://gitlab.haskell.org/ghc/head.hackage/

packages: packcheck.cabal

repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
key-threshold: 3
root-keys:
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d

active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override

allow-newer: all
3 changes: 2 additions & 1 deletion packcheck.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ synopsis: Universal build and CI testing for Haskell packages
description:
This package contains a universal CI/build script @packcheck.sh@ and config
files designed such that you can just copy over
@.github\/workflows/packcheck.yml@, @appveyor.yml@ or @.circleci/config.yml@
@.github\/workflows/packcheck.yml@, @appveyor.yml@ or @.circleci/config.yml@
to your package repo and your package is CI ready
in a jiffy. You can build and test packages on local machine as well. For
local testing, copy @packcheck.sh@ to your local machine, put it in your
Expand Down Expand Up @@ -54,6 +54,7 @@ extra-source-files:
appveyor.yml
cabal.project.coveralls
cabal.project
cabal.project.ghc-head
packcheck.sh
packcheck-safe.sh
packcheck-remote.sh
Expand Down
4 changes: 4 additions & 0 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,10 @@ ghcup_install() {
#$GHCUP_PATH set $tool $tool_ver
fi

# This is a workaround for a bug in ghcup. See,
# https://github.com/actions/runner-images/issues/7061#issuecomment-1422639889
rm -f /usr/local/.ghcup/cache/ghcup-0.0.8.yaml

if test "$tool" = "ghc"
then
run_verbose_errexit ghcup install ghc $GHCUP_GHC_OPTIONS $tool_ver
Expand Down

0 comments on commit 4831f05

Please sign in to comment.