Skip to content

Commit

Permalink
Regularise the building and testing of packages
Browse files Browse the repository at this point in the history
This moves the specificaiton of which packages we have and which
versions of GHC they don't support to a data file, which we can then use
to select the packages to build programmatically, rather than having an
explicit listing of steps in the workflow file.
  • Loading branch information
michaelpj committed Jun 11, 2023
1 parent 8176fb8 commit 2b22b2a
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 195 deletions.
8 changes: 3 additions & 5 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
cabal:
description: "Cabal version"
required: false
default: "3.8.1.0"
default: "3.10"
os:
description: "Operating system: Linux, Windows or macOS"
required: true
Expand Down Expand Up @@ -57,11 +57,9 @@ runs:
- if: inputs.shorten-hls == 'true'
name: Workaround shorten binary names
run: |
sed -i.bak -e 's/haskell-language-server/hls/g' \
-e 's/haskell_language_server/hls/g' \
sed -i.bak -e 's/executable haskell-language-server/executable hls/g' \
-e 's/haskell-language-server:haskell-language-server/haskell-language-server:hls/g' \
haskell-language-server.cabal cabal.project
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
src/**/*.hs exe/*.hs
shell: bash

- name: Retrieving `cabal.project` Hackage timestamp
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ jobs:
paths_ignore: '[ "**/docs/**"
, "**.md"
, "**/LICENSE"
, ".circleci/**"
, "**.nix"
, "**/test/**"
, "flake.lock"
, "**/README.md"
, "FUNDING.yml"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, "**.yml"
, "**.yaml"
, ".circleci/**"
, ".gitlab/**"
, ".github/**"
]'

bench_init:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,16 @@ jobs:
uses: fkirc/[email protected]
with:
cancel_others: false
paths_ignore: '["**/docs/**"
paths_ignore: '[ "**/docs/**"
, "**.md"
, "**/LICENSE"
, "**.nix"
, "flake.lock"
, "**/README.md"
, "FUNDING.yml"
, "**.yml"
, "**.yaml"
, ".circleci/**"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
, ".github/**"
]'

caching:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ jobs:
, "**/LICENSE"
, "**.nix"
, "flake.lock"
, "**/README.md"
, "FUNDING.yml"
, "**.yml"
, "**.yaml"
, ".circleci/**"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
, ".github/**"
]'

flags:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ jobs:
paths_ignore: '[ "**/docs/**"
, "**.md"
, "**/LICENSE"
, "**.yml"
, "**.yaml"
, ".circleci/**"
, "**/README.md"
, "FUNDING.yml"
, "**/stack*.yaml"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
, ".github/**"
]'
- id: skip_check_no_nix
uses: fkirc/[email protected]
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{ "package": "haskell-language-server", "excluded_ghcs" : [] }
, { "package": "hie-compat", "excluded_ghcs" : [] }
, { "package": "shake-bench", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-graph", "excluded_ghcs" : [] }
, { "package": "ghcide", "excluded_ghcs" : [] }
, { "package": "ghcide-bench", "excluded_ghcs" : [] }
, { "package": "ghcide-test-utils", "excluded_ghcs" : [] }
, { "package": "hls-plugin-api", "excluded_ghcs" : [] }
, { "package": "hls-test-utils", "excluded_ghcs" : [] }
, { "package": "hls-cabal-plugin", "excluded_ghcs" : [] }
, { "package": "hls-cabal-fmt-plugin", "excluded_ghcs" : [] }
, { "package": "hls-tactics-plugin", "excluded_ghcs" : ["9.2", "9.4", "9.6"] }
, { "package": "hls-stylish-haskell-plugin", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-fourmolu-plugin", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-class-plugin", "excluded_ghcs" : [] }
, { "package": "hls-eval-plugin", "excluded_ghcs" : ["9.4"] }
, { "package": "hls-explicit-imports-plugin", "excluded_ghcs" : [] }
, { "package": "hls-refine-imports-plugin", "excluded_ghcs" : [] }
, { "package": "hls-hlint-plugin", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-rename-plugin", "excluded_ghcs" : [] }
, { "package": "hls-retrie-plugin", "excluded_ghcs" : [] }
, { "package": "hls-haddock-comments-plugin", "excluded_ghcs" : ["9.2", "9.4", "9.6"] }
, { "package": "hls-splice-plugin", "excluded_ghcs" : [] }
, { "package": "hls-floskell-plugin", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-pragmas-plugin", "excluded_ghcs" : [] }
, { "package": "hls-module-name-plugin", "excluded_ghcs" : [] }
, { "package": "hls-ormolu-plugin", "excluded_ghcs" : ["9.6"] }
, { "package": "hls-call-hierarchy-plugin", "excluded_ghcs" : [] }
, { "package": "hls-alternate-number-format-plugin", "excluded_ghcs" : [] }
, { "package": "hls-qualify-imported-names-plugin", "excluded_ghcs" : [] }
, { "package": "hls-code-range-plugin", "excluded_ghcs" : [] }
, { "package": "hls-change-type-signature-plugin", "excluded_ghcs" : [] }
, { "package": "hls-stan-plugin", "excluded_ghcs" : [ "9.0", "9.2", "9.4", "9.6"] }
, { "package": "hls-gadt-plugin", "excluded_ghcs" : [] }
, { "package": "hls-explicit-fixity-plugin", "excluded_ghcs" : [] }
, { "package": "hls-explicit-record-fields-plugin", "excluded_ghcs" : [] }
, { "package": "hls-refactor-plugin", "excluded_ghcs" : [] }
, { "package": "hls-overloaded-record-dot-plugin", "excluded_ghcs" : ["8.10", "9.0"] }
]
Loading

0 comments on commit 2b22b2a

Please sign in to comment.