Skip to content

Commit

Permalink
Simplify selection of GHCs to build on (#3633)
Browse files Browse the repository at this point in the history
* Simplify selection of GHCs to build on

The haskell setup action supports using the major version, and then it
will select the latest minor version. That should be fine for us - we
don't have to change anything to get new minor versions, and it's not
too much of a problem to get new minor versions implicitly, since they
should be very unlikely to break things.

* update exclusions

* Fixup

* More

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
michaelpj and mergify[bot] authored Jun 11, 2023
1 parent 79747f4 commit 8176fb8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
fail-fast: false
matrix:
ghc:
- '8.10.7'
- '9.2.7'
- '8.10'
- '9.2'
os:
- ubuntu-latest

Expand Down Expand Up @@ -115,9 +115,9 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['8.10.7', '9.2.7']
ghc: ['8.10', '9.2']
os: [ubuntu-latest]
cabal: ['3.6']
cabal: ['3.10']
example: ['cabal', 'lsp-types']

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
# Fetching from github cache is faster than doing it from hackage
# Sources does not change per ghc and ghc version son only doing it
# for one matrix job (it is arbitrary)
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10'
name: Download sources
run: |
cabal $cabalBuild --only-download --enable-benchmarks --enable-tests
Expand All @@ -117,7 +117,7 @@ jobs:
# We build ghcide with benchs and test enabled to include its dependencies in the cache
# (including shake-bench)
# Only for the same ghc and os used in the bench workflow, so we save cache space
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10'
name: Build ghcide benchmark
run: |
cabal $cabalBuild ghcide --enable-benchmarks --enable-tests
2 changes: 1 addition & 1 deletion .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe ekg"

# we have to clean up warnings for 9.0 and 9.2 before enable -Wall
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.7'
- if: matrix.ghc != '9.0' && matrix.ghc != '9.2'
name: Build with pedantic (-WError)
run: cabal v2-build --flags="pedantic"

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/hackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
"hls-qualify-imported-names-plugin", "hls-code-range-plugin",
"hls-cabal-fmt-plugin",
"haskell-language-server"]
ghc: [ "9.0.2"
, "8.10.7"
ghc: [ "9.0"
, "8.10"
]
exclude:
- ghc: "9.0.2"
- ghc: "9.0"
package: "hls-stylish-haskell-plugin"

steps:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
# The solver takes in account all project packages, even if they are not gonna be effectively built
# (like stylish-haskell for ghc-9.0)
- name: "Add temporary needed allow-newer for ghc-9.0"
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0.2'
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
# For stylish-haskell
Expand All @@ -133,7 +133,7 @@ jobs:
cabal haddock --haddock-for-hackage
- name: "Upload package dist tarball"
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10.7'
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: ./.github/actions/setup-build
with:
# select a stable GHC version
ghc: 9.2.7
ghc: 9.2
os: ${{ runner.os }}
shorten-hls: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supported-ghc-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[ "9.6.1", "9.4.5" , "9.2.7" , "9.0.2" , "8.10.7" ]
[ "9.6", "9.4" , "9.2" , "9.0" , "8.10" ]
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || cabal test hls-refactor-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.6'
name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS"

Expand All @@ -154,27 +154,27 @@ jobs:
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.6'
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.6'
name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.6'
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS"

Expand All @@ -194,11 +194,11 @@ jobs:
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.6'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1'
- if: matrix.test && matrix.ghc != '9.0' && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-stan-plugin test suite
run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || cabal test hls-stan-plugin --test-options="$TEST_OPTS"

Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
run: cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS"

## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
- if: matrix.test && matrix.ghc == '8.10.7'
- if: matrix.test && matrix.ghc == '8.10'
name: Test hls-cabal-fmt-plugin test suite
run: cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" || cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS"

Expand All @@ -247,7 +247,7 @@ jobs:
name: Test hls-retrie-plugin test suite
run: cabal test hls-retrie-plugin --test-options="$TEST_OPTS" || cabal test hls-retrie-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '8.10.7' && matrix.ghc != '9.0.2'
- if: matrix.test && matrix.ghc != '8.10' && matrix.ghc != '9.0'
name: Test hls-overloaded-record-dot-plugin test suite
run: cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS"

Expand Down

0 comments on commit 8176fb8

Please sign in to comment.