mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-09-11 16:56:14 +03:00
Experiment with loading matrix values from a file (#3481)
* Experiment with loading matrix values from a file The goal here is to avoid duplication of e.g. which versions of GHC we support. This is an experiment at the moment. * fix some warnings in hlint plugin
This commit is contained in:
parent
d3a5ee1a6d
commit
efbf253d35
7
.github/workflows/bench.yml
vendored
7
.github/workflows/bench.yml
vendored
@ -46,8 +46,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ghc: ['8.10.7', '9.2.5']
|
||||
os: [ubuntu-latest]
|
||||
ghc:
|
||||
- '8.10.7'
|
||||
- '9.2.5'
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
# This code is fitted to the strategy: assumes Linux is used ... etc,
|
||||
# change of the strategy may require changing the bootstrapping/run code
|
||||
|
21
.github/workflows/caching.yml
vendored
21
.github/workflows/caching.yml
vendored
@ -54,8 +54,13 @@ jobs:
|
||||
pre_job:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ghcs: ${{ steps.ghcs.outputs.ghcs }}
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
steps:
|
||||
# Need the repo checked out in order to read the file
|
||||
- uses: actions/checkout@v3
|
||||
- id: ghcs
|
||||
run: echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v5.3.0
|
||||
with:
|
||||
@ -80,17 +85,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# This list of GHC (including the "exclude" list) versions must match
|
||||
# to the list of GHC versions specified in 'test.yml'
|
||||
ghc: [ "9.4.4"
|
||||
, "9.2.5"
|
||||
, "9.0.2"
|
||||
, "8.10.7"
|
||||
]
|
||||
os: [ "ubuntu-latest"
|
||||
, "macOS-latest"
|
||||
, "windows-latest"
|
||||
]
|
||||
ghc: ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-latest
|
||||
- windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
14
.github/workflows/flags.yml
vendored
14
.github/workflows/flags.yml
vendored
@ -18,8 +18,13 @@ jobs:
|
||||
pre_job:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ghcs: ${{ steps.ghcs.outputs.ghcs }}
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
steps:
|
||||
# Need the repo checked out in order to read the file
|
||||
- uses: actions/checkout@v3
|
||||
- id: ghcs
|
||||
run: echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v5.3.0
|
||||
with:
|
||||
@ -44,12 +49,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ghc: [ "9.2.5"
|
||||
, "9.0.2"
|
||||
, "8.10.7"
|
||||
]
|
||||
os: [ "ubuntu-latest"
|
||||
]
|
||||
ghc: ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
1
.github/workflows/supported-ghc-versions.json
vendored
Normal file
1
.github/workflows/supported-ghc-versions.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[ "9.4.4" , "9.2.5" , "9.0.2" , "8.10.7" ]
|
46
.github/workflows/test.yml
vendored
46
.github/workflows/test.yml
vendored
@ -20,7 +20,12 @@ jobs:
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
should_skip_ghcide: ${{ steps.skip_ghcide_check.outputs.should_skip }}
|
||||
ghcs: ${{ steps.ghcs.outputs.ghcs }}
|
||||
steps:
|
||||
# Need the repo checked out in order to read the file
|
||||
- uses: actions/checkout@v3
|
||||
- id: ghcs
|
||||
run: echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v5.3.0
|
||||
with:
|
||||
@ -52,7 +57,8 @@ jobs:
|
||||
|
||||
test:
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
needs: pre_job
|
||||
needs:
|
||||
- pre_job
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
@ -60,41 +66,17 @@ jobs:
|
||||
# **don't forget**
|
||||
# to update the ghc versions in 'caching.yml'.
|
||||
matrix:
|
||||
ghc: [ "9.4.4"
|
||||
, "9.2.5"
|
||||
, "9.0.2"
|
||||
, "8.10.7"
|
||||
]
|
||||
os: [ "ubuntu-latest"
|
||||
, "macOS-latest"
|
||||
, "windows-latest"
|
||||
]
|
||||
# Mark which GHC versions on which platform we want to test.
|
||||
ghc: ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-latest
|
||||
- windows-latest
|
||||
# Mark which GHC versions on which platforms we want to test.
|
||||
include:
|
||||
# only test supported ghc major versions
|
||||
# Test all supported versions, but only on ubuntu and windows
|
||||
- os: ubuntu-latest
|
||||
ghc: '9.4.4'
|
||||
test: true
|
||||
- os: ubuntu-latest
|
||||
ghc: '9.2.5'
|
||||
test: true
|
||||
- os: ubuntu-latest
|
||||
ghc: '9.0.2'
|
||||
test: true
|
||||
- os: ubuntu-latest
|
||||
ghc: '8.10.7'
|
||||
test: true
|
||||
- os: windows-latest
|
||||
ghc: '9.4.4'
|
||||
test: true
|
||||
- os: windows-latest
|
||||
ghc: '9.2.5'
|
||||
test: true
|
||||
- os: windows-latest
|
||||
ghc: '9.0.2'
|
||||
test: true
|
||||
- os: windows-latest
|
||||
ghc: '8.10.7'
|
||||
test: true
|
||||
|
||||
steps:
|
||||
|
@ -20,6 +20,11 @@
|
||||
|
||||
{-# OPTIONS_GHC -Wno-orphans #-}
|
||||
|
||||
-- On 9.4 we get a new redundant constraint warning, but deleting the
|
||||
-- constraint breaks the build on earlier versions. Rather than apply
|
||||
-- lots of CPP, we just disable the warning until later.
|
||||
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
|
||||
|
||||
#ifdef HLINT_ON_GHC_LIB
|
||||
#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc_lib_parser(x,y,z)
|
||||
#else
|
||||
@ -134,8 +139,11 @@ import Development.IDE.Spans.Pragmas (LineSplitTe
|
||||
lineSplitTextEdits,
|
||||
nextPragmaLine)
|
||||
import GHC.Generics (Generic)
|
||||
#if MIN_VERSION_apply_refact(0,12,0)
|
||||
#else
|
||||
import System.Environment (setEnv,
|
||||
unsetEnv)
|
||||
#endif
|
||||
import Text.Regex.TDFA.Text ()
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user