diff --git a/.github/mergify.yml b/.github/mergify.yml index f746f92c71..06a48cd928 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -6,29 +6,42 @@ pull_request_rules: name: Automatically merge pull requests conditions: - status-success=bench (8.10.2, ubuntu-latest) - - status-success=bench (8.6.5, ubuntu-latest) - status-success=bench (8.8.4, ubuntu-latest) - - status-success=nix (default, macOS-latest) + - status-success=bench (8.6.5, ubuntu-latest) + - status-success=nix (default, ubuntu-latest) + - status-success=nix (default, macOS-latest) + - status-success=test (8.10.3, ubuntu-latest) - - status-success=test (8.10.3, windows-latest) + - status-success=test (8.10.3, macOS-latest) - status-success=test (8.10.2, ubuntu-latest) + - status-success=test (8.10.2, macOS-latest) - status-success=test (8.10.1, ubuntu-latest) + - status-success=test (8.10.1, macOS-latest) - status-success=test (8.8.4, ubuntu-latest) + - status-success=test (8.8.4, macOS-latest) - status-success=test (8.8.3, ubuntu-latest) + - status-success=test (8.8.3, macOS-latest) - status-success=test (8.8.2, ubuntu-latest) + - status-success=test (8.8.2, macOS-latest) - status-success=test (8.6.5, ubuntu-latest) + - status-success=test (8.6.5, macOS-latest) - status-success=test (8.6.4, ubuntu-latest) + - status-success=test (8.6.4, macOS-latest) + - status-success=test (windows-latest, 8.10.3, true) + - status-success=test (windows-latest, 8.6.5, true) - status-success=test (windows-latest, 8.10.2.2) + - status-success=test (windows-latest, 8.10.1) + - status-success=test (windows-latest, 8.6.4) - - 'status-success=ci/circleci: ghc-8.10.1' - 'status-success=ci/circleci: ghc-8.10.3' - - 'status-success=ci/circleci: ghc-8.6.4' - - 'status-success=ci/circleci: ghc-8.8.2' - - 'status-success=ci/circleci: ghc-8.8.3' - 'status-success=ci/circleci: ghc-8.10.2' - - 'status-success=ci/circleci: ghc-8.6.5' + - 'status-success=ci/circleci: ghc-8.10.1' - 'status-success=ci/circleci: ghc-8.8.4' + - 'status-success=ci/circleci: ghc-8.8.3' + - 'status-success=ci/circleci: ghc-8.8.2' + - 'status-success=ci/circleci: ghc-8.6.5' + - 'status-success=ci/circleci: ghc-8.6.4' - 'status-success=ci/circleci: ghc-default' - label=merge me diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3547e82e5d..0e455a2608 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,9 @@ name: Testing +defaults: + run: + shell: bash + on: [pull_request] jobs: test: @@ -7,22 +11,37 @@ jobs: strategy: fail-fast: true matrix: - ghc: ['8.10.3', "8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"] - os: [ubuntu-latest, windows-latest] - exclude: - - os: windows-latest - ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550 + ghc: ["8.10.3", "8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"] + os: [ubuntu-latest, macOS-latest] + include: + # one ghc-lib build + # should be renabled: #784 + # - os: ubuntu-latest + # ghc: '8.10.1' + # ghc-lib: true + # only test supported ghc major versions + - os: ubuntu-latest + ghc: '8.10.3' + test: true - os: windows-latest - ghc: "8.8.4" # also fails due to segfault :( + ghc: '8.10.3' + test: true + - os: ubuntu-latest + ghc: '8.8.4' + test: true + - os: ubuntu-latest + ghc: '8.6.5' + test: true - os: windows-latest - ghc: "8.8.3" # fails due to segfault + ghc: '8.6.5' + test: true + # only build rest of supported ghc versions for windows - os: windows-latest - ghc: "8.8.2" # fails due to error with Cabal + ghc: '8.10.2.2' - os: windows-latest - ghc: "8.6.4" # times out after 300m - include: + ghc: '8.10.1' - os: windows-latest - ghc: "8.10.2.2" # only available for windows and choco + ghc: '8.6.4' steps: # Cancel queued workflows from earlier commits in this branch @@ -39,14 +58,26 @@ jobs: - run: ./fmt.sh name: "HLint via ./fmt.sh" + - name: Set some window specific things + if: matrix.os == 'windows-latest' + run: | + echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV + echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV + + - name: Set some linux/macOS specific things + if: matrix.os != 'windows-latest' + run: | + echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV + echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV + - name: Cache Cabal uses: actions/cache@v2 env: cache-name: cache-cabal with: path: | - ~/.cabal/packages - ~/.cabal/store + ${{ env.CABAL_PKGS_DIR }} + ${{ env.CABAL_STORE_DIR }} key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: | ${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} @@ -57,7 +88,6 @@ jobs: # Need this to work around filepath length limits in Windows - name: Shorten binary names - shell: bash run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ @@ -66,27 +96,26 @@ jobs: src/**/*.hs exe/*.hs - name: Build - shell: bash # Retry it three times to workaround compiler segfaults in windows run: cabal build || cabal build || cabal build - name: Test ghcide - shell: bash + if: ${{ matrix.test }} # run the tests without parallelism to avoid running out of memory run: cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun" - name: Test func-test suite - shell: bash + if: ${{ matrix.test }} env: HLS_TEST_EXE: hls HLS_WRAPPER_TEST_EXE: hls-wrapper # run the tests without parallelism, otherwise tasty will attempt to run # all functional test cases simultaneously which causes way too many hls # instances to be spun up for the poor github actions runner to handle - run: cabal test func-test --test-options="-j1 --rerun-update" || cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun" + run: cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun" - name: Test wrapper-test suite - shell: bash + if: ${{ matrix.test }} env: HLS_TEST_EXE: hls HLS_WRAPPER_TEST_EXE: hls-wrapper diff --git a/cabal.project b/cabal.project index 849a8d80bf..4f273244d5 100644 --- a/cabal.project +++ b/cabal.project @@ -26,7 +26,7 @@ package ghcide write-ghc-environment-files: never -index-state: 2021-01-03T11:58:44Z +index-state: 2021-01-07T18:06:52Z allow-newer: active:base, diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 42e777a0fb..5a52f83b8a 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -13,7 +13,7 @@ description: A library for building Haskell IDE's on top of the GHC API. homepage: https://github.com/haskell/ghcide#readme bug-reports: https://github.com/haskell/ghcide/issues -tested-with: GHC>=8.6.5 +tested-with: GHC == 8.6.4 || == 8.6.5 || == 8.8.2 || == 8.8.3 || == 8.8.4 || == 8.10.1 || == 8.10.2 || == 8.10.3 extra-source-files: include/ghc-api-version.h README.md CHANGELOG.md test/data/hover/*.hs test/data/multi/cabal.project diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index f320f7d2ef..5a71ec2a15 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -14,6 +14,7 @@ copyright: Alan Zimmerman license: Apache-2.0 license-file: LICENSE build-type: Simple +tested-with: GHC == 8.6.4 || == 8.6.5 || == 8.8.2 || == 8.8.3 || == 8.8.4 || == 8.10.1 || == 8.10.2 || == 8.10.3 extra-source-files: README.md ChangeLog.md