From 6356550631ed9b6a117831f2e96e0c499524b83f Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 2 Jan 2021 15:27:28 +0100 Subject: [PATCH 01/10] Only test last ghc minor version --- .github/workflows/test.yml | 49 +++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3547e82e5d..aba96caad4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,22 +7,46 @@ 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: macOS-latest + ghc: '8.10.3' + test: true + - 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: macOS-latest + ghc: '8.8.4' + test: true + - os: ubuntu-latest + ghc: '8.8.4' + test: true + - os: macOS-latest + ghc: '8.6.5' + 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 @@ -71,11 +95,13 @@ jobs: run: cabal build || cabal build || cabal build - name: Test ghcide + if: ${{ !matrix.ghc-lib && matrix.test }} shell: bash # 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 + if: ${{ !matrix.ghc-lib && matrix.test }} shell: bash env: HLS_TEST_EXE: hls @@ -86,6 +112,7 @@ jobs: 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" - name: Test wrapper-test suite + if: ${{ !matrix.ghc-lib && matrix.test }} shell: bash env: HLS_TEST_EXE: hls From 21f8273c49e01d07a996189b582d9f61a500bf55 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 7 Jan 2021 12:11:51 +0100 Subject: [PATCH 02/10] Set dirs for windows cabal cache --- .github/workflows/test.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aba96caad4..738faef10f 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: @@ -63,14 +67,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') }} @@ -81,7 +97,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' \ @@ -90,30 +105,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 if: ${{ !matrix.ghc-lib && matrix.test }} - shell: bash # 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 if: ${{ !matrix.ghc-lib && matrix.test }} - shell: bash 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 if: ${{ !matrix.ghc-lib && matrix.test }} - shell: bash env: HLS_TEST_EXE: hls HLS_WRAPPER_TEST_EXE: hls-wrapper From e449ac3f40228e84a92b799cd256cff79dc2da6f Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 7 Jan 2021 22:44:21 +0100 Subject: [PATCH 03/10] Correct restore-key expression --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 738faef10f..481442ab01 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: ${{ env.CABAL_STORE_DIR }} key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} + ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} ${{ runner.os }}-${{ matrix.ghc }}-build- ${{ runner.os }}-${{ matrix.ghc }} From e2f55c364de6407b7b8d8ef7e834b440f922b4ba Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 7 Jan 2021 23:26:45 +0100 Subject: [PATCH 04/10] Update hackage index --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From ecf1781909d550703d8712da997213a463dbdb13 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 8 Jan 2021 10:33:09 +0100 Subject: [PATCH 05/10] Be strict in the restore cache key --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 481442ab01..4225072cbe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,10 +88,6 @@ jobs: ${{ env.CABAL_PKGS_DIR }} ${{ env.CABAL_STORE_DIR }} key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - ${{ runner.os }}-${{ matrix.ghc }}-build- - ${{ runner.os }}-${{ matrix.ghc }} - run: cabal update From 19bc1f1213399db5eb064f76579cc4f964082c14 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 8 Jan 2021 12:42:37 +0100 Subject: [PATCH 06/10] Drop macOS tests --- .github/workflows/test.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4225072cbe..bcb29df0ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,24 +20,15 @@ jobs: # ghc: '8.10.1' # ghc-lib: true # only test supported ghc major versions - - os: macOS-latest - ghc: '8.10.3' - test: true - os: ubuntu-latest ghc: '8.10.3' test: true - os: windows-latest ghc: '8.10.3' test: true - - os: macOS-latest - ghc: '8.8.4' - test: true - os: ubuntu-latest ghc: '8.8.4' test: true - - os: macOS-latest - ghc: '8.6.5' - test: true - os: ubuntu-latest ghc: '8.6.5' test: true From 82db60ad21336e8df7ba2ff94360f44979906b95 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 8 Jan 2021 17:36:18 +0100 Subject: [PATCH 07/10] Update tested-with GHC in cabal config --- ghcide/ghcide.cabal | 2 +- haskell-language-server.cabal | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 From 7779b1cd35f56ec6240b3c90657ba9ead8ea94ca Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 9 Jan 2021 16:01:41 +0100 Subject: [PATCH 08/10] Remove ghc-lib from test conditions --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcb29df0ac..d48e750b65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,12 +96,12 @@ jobs: run: cabal build || cabal build || cabal build - name: Test ghcide - if: ${{ !matrix.ghc-lib && matrix.test }} + 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 - if: ${{ !matrix.ghc-lib && matrix.test }} + if: ${{ matrix.test }} env: HLS_TEST_EXE: hls HLS_WRAPPER_TEST_EXE: hls-wrapper @@ -111,7 +111,7 @@ jobs: 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 - if: ${{ !matrix.ghc-lib && matrix.test }} + if: ${{ matrix.test }} env: HLS_TEST_EXE: hls HLS_WRAPPER_TEST_EXE: hls-wrapper From 1b3dd7c5c99059d7b5a8f3e4570b3b8b87481e6f Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 9 Jan 2021 16:05:17 +0100 Subject: [PATCH 09/10] Restore restore-keys --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d48e750b65..0e455a2608 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,6 +79,10 @@ jobs: ${{ 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') }} + ${{ runner.os }}-${{ matrix.ghc }}-build- + ${{ runner.os }}-${{ matrix.ghc }} - run: cabal update From 8f888c2a5929a1279d64a8c93c999cb54bfc4a1c Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 10 Jan 2021 22:12:02 +0100 Subject: [PATCH 10/10] Update mergify checks --- .github/mergify.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) 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