Extend CI with all GHC minor versions supported by hls and fix ghc-8.8.3 and ghc-8.8.2 builds (#947)

* Extend CI matrix with all the GHC minor versions supported by HLS
  * Adding a new job for windows: ghc-8.10.2.2

* Use GADTs for all ghc versions in Development.IDE.Plugin.Completions.Logic 
  * Fix ghc-8.8.2 and ghc-8.8.3 builds

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
This commit is contained in:
Javier Neira 2020-12-11 12:23:16 +01:00 committed by GitHub
parent baafe2cb82
commit 27b4250bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 16 deletions

View File

@ -1,6 +1,6 @@
name: Benchmark
on: [push, pull_request]
on: [pull_request]
jobs:
bench:
runs-on: ${{ matrix.os }}

View File

@ -1,6 +1,6 @@
name: Nix
on: [push, pull_request]
on: [pull_request]
jobs:
nix:
runs-on: ${{ matrix.os }}

View File

@ -1,6 +1,6 @@
name: Testing
on: [push, pull_request]
on: [pull_request]
jobs:
test:
timeout-minutes: 360
@ -8,20 +8,47 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
ghc: ['8.10.2', '8.8.4', '8.6.5']
# all versions to only build or test for non windows os's
# inclusions will modify the major ones to mark them as testables
os: [macOS-latest, ubuntu-latest]
ghc: ['8.10.2', '8.10.1', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4']
ghc-lib: [false]
exclude:
- os: windows-latest
ghc: '8.10.2' # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
- os: windows-latest
ghc: '8.8.4' # also fails due to segfault :(
include:
- os: windows-latest
ghc: '8.10.1'
# one ghc-lib build
- os: ubuntu-latest
ghc: '8.10.1'
ghc-lib: true
# only test supported ghc major versions
- os: macOS-latest
ghc: '8.10.2'
test: true
- os: ubuntu-latest
ghc: '8.10.2'
test: true
# specific 8.10.2 version for windows and chocolatey
- os: windows-latest
ghc: '8.10.2.2'
test: true
- os: macOS-latest
ghc: '8.8.4'
test: true
- os: ubuntu-latest
ghc: '8.8.4'
test: true
- os: macOS-latest
ghc: '8.6.5'
test: true
- os: ubuntu-latest
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '8.6.5'
test: true
# only build rest of supported ghc versions for windows
- os: windows-latest
ghc: '8.10.1'
- os: windows-latest
ghc: '8.6.4'
steps:
- uses: actions/checkout@v2
@ -62,7 +89,7 @@ jobs:
run: cabal build || cabal build || cabal build
- name: Test
if: ${{ !matrix.ghc-lib && matrix.test }}
shell: bash
# run the tests without parallelism to avoid running out of memory
run: cabal test --test-options="-j1 --rerun-update" || cabal test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test --test-options="-j1 --rerun"
if: ${{ !matrix.ghc-lib}}

View File

@ -1,9 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs#-}
#include "ghc-api-version.h"
#if MIN_GHC_API_VERSION (8,8,4)
{-# LANGUAGE GADTs#-}
#endif
-- Mostly taken from "haskell-ide-engine"
module Development.IDE.Plugin.Completions.Logic (
CachedCompletions