Skip to content

Experiment with loading matrix values from a file #3481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure what to do here.

  • Benchmark on all GHC versions, why not?
  • Benchmark on GHC versions determined by some rule, e.g. the latest two versions?
  • Benchmark on some specific named versions

cc @pepeiborra

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't do automated regression analysis on benchmark results, so it doesn't really matter much. Benchmark on each ghc major version latest minor would be reasonable

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll add a note but I don't want to get into JSON processing right now :D

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
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand All @@ -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

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/supported-ghc-versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ "9.4.4" , "9.2.5" , "9.0.2" , "8.10.7" ]
46 changes: 14 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand Down Expand Up @@ -52,49 +57,26 @@ jobs:

test:
if: needs.pre_job.outputs.should_skip != 'true'
needs: pre_job
needs:
- pre_job
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
# when you edit this list of GHC versions,
# **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
- 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
# Test all supported versions, but only on ubuntu and windows
- 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:
Expand Down
8 changes: 8 additions & 0 deletions plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ()
-- ---------------------------------------------------------------------

Expand Down