diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 9fd57a7d..77074faa 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1,6 +1,6 @@ name: Benchmark -on: [push, pull_request] +on: [pull_request] jobs: bench: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 1590fa82..e43d39aa 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -1,6 +1,6 @@ name: Nix -on: [push, pull_request] +on: [pull_request] jobs: nix: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d06af7fc..2940d66c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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}} diff --git a/src/Development/IDE/Plugin/Completions/Logic.hs b/src/Development/IDE/Plugin/Completions/Logic.hs index 53e78355..f91a3f7e 100644 --- a/src/Development/IDE/Plugin/Completions/Logic.hs +++ b/src/Development/IDE/Plugin/Completions/Logic.hs @@ -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