forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge ghcide repository (replacing the submodule) (haskell#702)
- Loading branch information
Showing
168 changed files
with
28,708 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Benchmark | ||
|
||
on: [pull_request] | ||
jobs: | ||
bench: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc: ['8.10.2', '8.8.4', '8.6.5'] | ||
os: [ubuntu-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch origin master # check the master branch for benchmarking | ||
- uses: actions/setup-haskell@v1 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: '3.2' | ||
enable-stack: false | ||
|
||
- name: Cache Cabal | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cabal/packages | ||
~/.cabal/store | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-bench | ||
|
||
- run: cabal update | ||
|
||
- run: cabal configure --enable-benchmarks | ||
|
||
- name: Build | ||
shell: bash | ||
# Retry it three times to workaround compiler segfaults in windows | ||
run: cabal build ghcide:benchHist || cabal build ghcide:benchHist || cabal build ghcide:benchHist | ||
|
||
- name: Bench | ||
shell: bash | ||
# run the tests without parallelism, otherwise tasty will attempt to run | ||
# all test cases simultaneously which causes way too many hls | ||
# instances to be spun up for the poor github actions runner to handle | ||
run: cabal bench ghcide:benchHist | ||
|
||
- name: Display results | ||
shell: bash | ||
run: | | ||
column -s, -t < ghcide/bench-results/results.csv | tee ghcide/bench-results/results.txt | ||
- name: Archive benchmarking artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bench-results-${{ runner.os }}-${{ matrix.ghc }} | ||
path: | | ||
ghcide/bench-results/results.* | ||
ghcide/bench-results/**/*.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s ghcide/src ghcide/exe ghcide/bench shake-bench/src ghcide/test/exe --with-group=extra --hint=ghcide/.hlint.yaml |
Submodule ghcide
deleted from
6de5ac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
jobs: | ||
- job: ghcide_stack_linux | ||
timeoutInMinutes: 60 | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
variables: | ||
STACK_ROOT: $(Pipeline.Workspace)/.stack | ||
steps: | ||
- checkout: self | ||
- task: Cache@2 | ||
inputs: | ||
key: stack-root-cache | $(Agent.OS) | $(Build.SourcesDirectory)/stack.yaml | $(Build.SourcesDirectory)/ghcide.cabal | ||
path: $(STACK_ROOT) | ||
cacheHitVar: STACK_ROOT_CACHE_RESTORED | ||
displayName: "Cache stack root" | ||
- task: Cache@2 | ||
inputs: | ||
key: stack-work-cache | $(Agent.OS) | $(Build.SourcesDirectory)/stack.yaml | $(Build.SourcesDirectory)/ghcide.cabal | ||
path: .stack-work | ||
cacheHitVar: STACK_WORK_CACHE_RESTORED | ||
displayName: "Cache stack work" | ||
- bash: | | ||
./fmt.sh | ||
displayName: "HLint via ./fmt.sh" | ||
- bash: | | ||
sudo add-apt-repository ppa:hvr/ghc | ||
sudo apt-get update | ||
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev cabal-install-3.2 | ||
if ! which stack >/dev/null 2>&1; then | ||
curl -sSL https://get.haskellstack.org/ | sh | ||
fi | ||
mkdir -p $STACK_ROOT | ||
displayName: 'Install Stack' | ||
- bash: stack setup | ||
displayName: 'stack setup' | ||
- bash: cabal update # some tests use Cabal cradles | ||
displayName: 'cabal update' | ||
- bash: stack build --test --no-run-tests | ||
displayName: 'stack build --test --no-run-tests' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
jobs: | ||
- job: ghcide_stack_windows | ||
timeoutInMinutes: 120 | ||
pool: | ||
vmImage: 'windows-2019' | ||
variables: | ||
STACK_ROOT: "C:\\sr" | ||
steps: | ||
- checkout: self | ||
- task: Cache@2 | ||
inputs: | ||
key: stack-root-cache | $(Agent.OS) | $(Build.SourcesDirectory)/stack-windows.yaml | $(Build.SourcesDirectory)/ghcide.cabal | ||
path: $(STACK_ROOT) | ||
cacheHitVar: STACK_ROOT_CACHE_RESTORED | ||
displayName: "Cache stack root" | ||
- task: Cache@2 | ||
inputs: | ||
key: stack-work-cache | $(Agent.OS) | $(Build.SourcesDirectory)/stack-windows.yaml | $(Build.SourcesDirectory)/ghcide.cabal | ||
path: .stack-work | ||
cacheHitVar: STACK_WORK_CACHE_RESTORED | ||
displayName: "Cache stack work" | ||
- bash: | | ||
./fmt.sh | ||
displayName: "HLint via ./fmt.sh" | ||
- bash: | | ||
curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip | ||
unzip -o /usr/bin/stack.zip -d /usr/bin/ | ||
mkdir -p "$STACK_ROOT" | ||
displayName: 'Install Stack' | ||
- bash: stack setup --stack-yaml stack-windows.yaml | ||
displayName: 'stack setup' | ||
- bash: | | ||
# Installing happy and alex standalone to avoid error "strip.exe: unable to rename ../*.exe; reason: File exists" | ||
stack install happy --stack-yaml stack-windows.yaml | ||
stack install alex --stack-yaml stack-windows.yaml | ||
choco install -y cabal --version=$CABAL_VERSION | ||
$(cygpath $ProgramData)/chocolatey/bin/RefreshEnv.cmd | ||
# GHC 8.10.1 fails with ghc segfaults, using -fexternal-interpreter seems to make it working | ||
# There are other transient errors like timeouts downloading from stackage so we retry 3 times | ||
stack build --test --no-run-tests --stack-yaml stack-windows.yaml --ghc-options="-fexternal-interpreter" || stack build --test --no-run-tests --stack-yaml stack-windows.yaml --ghc-options="-fexternal-interpreter" || stack build --test --no-run-tests --stack-yaml stack-windows.yaml --ghc-options="-fexternal-interpreter" | ||
displayName: 'stack build --test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at https://EditorConfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = LF | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
:set -Wunused-binds -Wunused-imports -Worphans -Wunused-matches -Wincomplete-patterns | ||
|
||
:set -XBangPatterns | ||
:set -XDeriveFunctor | ||
:set -XDeriveGeneric | ||
:set -XGeneralizedNewtypeDeriving | ||
:set -XLambdaCase | ||
:set -XNamedFieldPuns | ||
:set -XOverloadedStrings | ||
:set -XRecordWildCards | ||
:set -XScopedTypeVariables | ||
:set -XStandaloneDeriving | ||
:set -XTupleSections | ||
:set -XTypeApplications | ||
:set -XViewPatterns | ||
|
||
:set -package=ghc | ||
:set -ignore-package=ghc-lib-parser | ||
:set -DGHC_STABLE | ||
:set -Iinclude | ||
:set -idist/build/autogen | ||
:set -isrc | ||
:set -isession-loader | ||
:set -iexe | ||
|
||
:set -isrc-ghc88 | ||
:set -idist-newstyle/build/x86_64-osx/ghc-8.8.3/ghcide-0.2.0/build/autogen | ||
|
||
:load Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
dist/ | ||
.stack-work/ | ||
dist-newstyle/ | ||
cabal.project.local | ||
*~ | ||
*.lock | ||
/.tasty-rerun-log | ||
.vscode | ||
/.hlint-* | ||
bench/example/ | ||
bench-results/ | ||
bench-temp/ | ||
.shake/ | ||
ghcide | ||
ghcide-bench | ||
ghcide-preprocessor | ||
*.benchmark-gcStats | ||
tags |
Oops, something went wrong.