From e99e272be18eb4bef7ae6f0750f0820eb4044923 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Sat, 10 Jun 2023 12:44:42 +0100 Subject: [PATCH 1/4] Simplify selection of GHCs to build on The haskell setup action supports using the major version, and then it will select the latest minor version. That should be fine for us - we don't have to change anything to get new minor versions, and it's not too much of a problem to get new minor versions implicitly, since they should be very unlikely to break things. --- .github/workflows/supported-ghc-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/supported-ghc-versions.json b/.github/workflows/supported-ghc-versions.json index 92ba74875b..1d3ad1f540 100644 --- a/.github/workflows/supported-ghc-versions.json +++ b/.github/workflows/supported-ghc-versions.json @@ -1 +1 @@ -[ "9.6.1", "9.4.5" , "9.2.7" , "9.0.2" , "8.10.7" ] +[ "9.6", "9.4" , "9.2" , "9.0" , "8.10" ] From 90447035f9e11e92a7ce7238de766a3eb43a1106 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Sat, 10 Jun 2023 14:03:01 +0100 Subject: [PATCH 2/4] update exclusions --- .github/workflows/test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a2dd198b5..0b0cd26961 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -138,7 +138,7 @@ jobs: name: Test hls-refactor-plugin run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || cabal test hls-refactor-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.6' name: Test hls-floskell-plugin run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" @@ -154,7 +154,7 @@ jobs: name: Test hls-eval-plugin run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6' name: Test hls-haddock-comments-plugin run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" @@ -162,19 +162,19 @@ jobs: name: Test hls-splice-plugin run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.6' name: Test hls-stylish-haskell-plugin run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.6' name: Test hls-ormolu-plugin run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.6' name: Test hls-fourmolu-plugin run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6' name: Test hls-tactics-plugin test suite run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" @@ -194,11 +194,11 @@ jobs: name: Test hls-rename-plugin test suite run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.6' name: Test hls-hlint-plugin test suite run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.7' && matrix.ghc != '9.4.5' && matrix.ghc != '9.6.1' + - if: matrix.test && matrix.ghc != '9.0' && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6' name: Test hls-stan-plugin test suite run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || cabal test hls-stan-plugin --test-options="$TEST_OPTS" @@ -235,7 +235,7 @@ jobs: run: cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" ## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions - - if: matrix.test && matrix.ghc == '8.10.7' + - if: matrix.test && matrix.ghc == '8.10' name: Test hls-cabal-fmt-plugin test suite run: cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" || cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" @@ -247,7 +247,7 @@ jobs: name: Test hls-retrie-plugin test suite run: cabal test hls-retrie-plugin --test-options="$TEST_OPTS" || cabal test hls-retrie-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '8.10.7' && matrix.ghc != '9.0.2' + - if: matrix.test && matrix.ghc != '8.10' && matrix.ghc != '9.0' name: Test hls-overloaded-record-dot-plugin test suite run: cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS" From 240e166b9bc28c3d601c8626bd349560a417f678 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Sat, 10 Jun 2023 16:17:46 +0100 Subject: [PATCH 3/4] Fixup --- .github/workflows/flags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flags.yml b/.github/workflows/flags.yml index 3a0eb64bc6..b5e94ec584 100644 --- a/.github/workflows/flags.yml +++ b/.github/workflows/flags.yml @@ -76,7 +76,7 @@ jobs: run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe ekg" # we have to clean up warnings for 9.0 and 9.2 before enable -Wall - - if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.7' + - if: matrix.ghc != '9.0' && matrix.ghc != '9.2' name: Build with pedantic (-WError) run: cabal v2-build --flags="pedantic" From d3954cee0569c1a58b16a13ee3fedf2ca6631cc3 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Sat, 10 Jun 2023 16:21:00 +0100 Subject: [PATCH 4/4] More --- .github/workflows/bench.yml | 8 ++++---- .github/workflows/caching.yml | 4 ++-- .github/workflows/hackage.yml | 10 +++++----- .github/workflows/pre-commit.yml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index c8a6f281ac..9bbe32f3c7 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -47,8 +47,8 @@ jobs: fail-fast: false matrix: ghc: - - '8.10.7' - - '9.2.7' + - '8.10' + - '9.2' os: - ubuntu-latest @@ -115,9 +115,9 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['8.10.7', '9.2.7'] + ghc: ['8.10', '9.2'] os: [ubuntu-latest] - cabal: ['3.6'] + cabal: ['3.10'] example: ['cabal', 'lsp-types'] steps: diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 5abedd5a26..e572f46da5 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -102,7 +102,7 @@ jobs: # Fetching from github cache is faster than doing it from hackage # Sources does not change per ghc and ghc version son only doing it # for one matrix job (it is arbitrary) - - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7' + - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10' name: Download sources run: | cabal $cabalBuild --only-download --enable-benchmarks --enable-tests @@ -117,7 +117,7 @@ jobs: # We build ghcide with benchs and test enabled to include its dependencies in the cache # (including shake-bench) # Only for the same ghc and os used in the bench workflow, so we save cache space - - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7' + - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10' name: Build ghcide benchmark run: | cabal $cabalBuild ghcide --enable-benchmarks --enable-tests diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index cf00ef0eed..18f4c35dee 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -40,11 +40,11 @@ jobs: "hls-qualify-imported-names-plugin", "hls-code-range-plugin", "hls-cabal-fmt-plugin", "haskell-language-server"] - ghc: [ "9.0.2" - , "8.10.7" + ghc: [ "9.0" + , "8.10" ] exclude: - - ghc: "9.0.2" + - ghc: "9.0" package: "hls-stylish-haskell-plugin" steps: @@ -108,7 +108,7 @@ jobs: # The solver takes in account all project packages, even if they are not gonna be effectively built # (like stylish-haskell for ghc-9.0) - name: "Add temporary needed allow-newer for ghc-9.0" - if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0.2' + if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0' run: | cd $(ls -d ./incoming/${{ matrix.package }}-*) # For stylish-haskell @@ -133,7 +133,7 @@ jobs: cabal haddock --haddock-for-hackage - name: "Upload package dist tarball" - if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10.7' + if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10' uses: actions/upload-artifact@v3 with: name: ${{ matrix.package }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d8af955611..4a3ab9ff5a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -27,7 +27,7 @@ jobs: - uses: ./.github/actions/setup-build with: # select a stable GHC version - ghc: 9.2.7 + ghc: 9.2 os: ${{ runner.os }} shorten-hls: false