Skip to content

Enable bench for 9.10 #4512

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 11 commits into from
Mar 9, 2025
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
20 changes: 10 additions & 10 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
jobs:
pre_job:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'performance')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Needs to be readded, right?

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 move it down to the run session, so if performance label is provided, we build and run the bench, if not, we only build the bench.

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
Expand Down Expand Up @@ -53,16 +52,16 @@ jobs:
# see discussion https://github.com/haskell/haskell-language-server/pull/4118
# also possible to add more GHCs if we performs better in the future.
ghc:
- '9.6'
- '9.8'
- '9.10'
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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:

# By default, the `pull_request` event has a `GITHUB_SHA` env variable
Expand Down Expand Up @@ -101,27 +100,28 @@ jobs:
tar -czf cabal.tar.gz *

- name: Upload workspace
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
retention-days: 1
path: workspace.tar.gz

- name: Upload .cabal
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
retention-days: 1
path: ~/.cabal/cabal.tar.gz

bench_example:
if: contains(github.event.pull_request.labels.*.name, 'performance')
needs: [bench_init, pre_job]
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
ghc: ['9.6', '9.8']
ghc: ['9.8', '9.10']
os: [ubuntu-latest]
cabal: ['3.10']
example: ['cabal', 'lsp-types']
Expand All @@ -134,13 +134,13 @@ jobs:
enable-stack: false

- name: Download cabal home
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
path: .

- name: Download workspace
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
path: .
Expand All @@ -165,7 +165,7 @@ jobs:
run: find bench-results -name "*.csv" -or -name "*.svg" -or -name "*.html" | xargs tar -czf benchmark-artifacts.tar.gz

- name: Archive benchmarking artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bench-results-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
path: benchmark-artifacts.tar.gz
Expand All @@ -175,7 +175,7 @@ jobs:
run: find bench-results -name "*.log" -or -name "*.hp" | xargs tar -czf benchmark-logs.tar.gz

- name: Archive benchmark logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bench-logs-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
path: benchmark-logs.tar.gz
Expand Down
3 changes: 0 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ constraints:
-- in the future, thus: TODO: remove this flag.
bitvec -simd,

if impl(ghc >= 9.9)
-- https://github.com/haskell/haskell-language-server/issues/4324
benchmarks: False

if impl(ghc >= 9.8.4) && impl(ghc < 9.8.5)
-- By depending on ghc-lib-parser and ghc, we are encountering
Expand Down
2 changes: 1 addition & 1 deletion haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ benchmark benchmark
hs-source-dirs: bench
build-tool-depends:
haskell-language-server:ghcide-bench,
hp2pretty:hp2pretty,
eventlog2html:eventlog2html,
default-extensions:
LambdaCase
RecordWildCards
Expand Down
2 changes: 0 additions & 2 deletions shake-bench/shake-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ source-repository head
location: https://github.com/haskell/haskell-language-server.git

library
if impl(ghc >= 9.10)
buildable: False
exposed-modules: Development.Benchmark.Rules
hs-source-dirs: src
build-depends:
Expand Down
2 changes: 1 addition & 1 deletion shake-bench/src/Development/Benchmark/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ heapProfileRules build = do
build -/- "*/*/*/*/*.heap.svg" %> \out -> do
let hpFile = dropExtension2 out <.> "hp"
need [hpFile]
cmd_ ("hp2pretty" :: String) [hpFile]
cmd_ ("eventlog2html" :: String) ["--heap-profile", hpFile]
liftIO $ renameFile (dropExtension hpFile <.> "svg") out

dropExtension2 :: FilePath -> FilePath
Expand Down
Loading