From 60474bff02f2621df13ffb26acd4218cf142f982 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 16:40:19 +0200 Subject: [PATCH 01/54] CI: cache-deps: stop asking `*-bench-*`, ask for the own `*-build-*` --- .github/workflows/cache-deps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 98935839c9..b4e3bb2cbc 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -98,7 +98,7 @@ jobs: ${{ env.CABAL_STORE_DIR }} key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} + v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} v2-${{ runner.os }}-${{ matrix.ghc }}-build- v2-${{ runner.os }}-${{ matrix.ghc }} From 9117ae5abdf0008bffd862589be0d6bf2fd7f05c Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 16:46:15 +0200 Subject: [PATCH 02/54] CI: {test,bench}: stop creating & using `*-bench-*` storage As we see - `bench` stored the: ``` path: | ~/.cabal/packages ~/.cabal/store ``` Which means it stored just dependencies again, but now with `bench` deps aslo. That duplication alse depleated the cache pool quick & created a complexity in the cache key hitting for restoration. `cache-deps` now going to already build deps for tests & bench. --- .github/workflows/bench.yml | 3 +-- .github/workflows/cache-deps.yml | 2 +- .github/workflows/test.yml | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ef6e44885e..869cb615a6 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -50,10 +50,9 @@ jobs: path: | ~/.cabal/packages ~/.cabal/store - key: v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} restore-keys: | v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - v2-${{ runner.os }}-${{ matrix.ghc }}-bench- + v2-${{ runner.os }}-${{ matrix.ghc }}-build- v2-${{ runner.os }}-${{ matrix.ghc }} - run: cabal update diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index b4e3bb2cbc..faf62a9c61 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -115,4 +115,4 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build - run: cabal build --only-dependencies || cabal build --only-dependencies || cabal build --only-dependencies + run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 086fc7d0e4..9f0412c299 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,7 +124,6 @@ jobs: ${{ env.CABAL_STORE_DIR }} key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} v2-${{ runner.os }}-${{ matrix.ghc }}-build- v2-${{ runner.os }}-${{ matrix.ghc }} From 1d4b245ad9d36ba9fa8ff1271958030e7f821633 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 16:59:19 +0200 Subject: [PATCH 03/54] CI: flatten the key restore structure Docs: > The cache action first searches for cache hits for `key` and `restore-keys` in the branch containing the workflow run. If there are no hits in the current branch, the cache action searches for `key` and `restore-keys` in the parent branch and upstream branches. So the `key` matches first in any case & scenario. & because `*-bench-*` was proven to be superflous & so removed - now we have only 1 namespace to search through. & so we arrived at this simple solution (it is also exactly the way how cache nicely works in repositories I manage). --- .github/workflows/bench.yml | 5 +---- .github/workflows/cache-deps.yml | 5 +---- .github/workflows/test.yml | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 869cb615a6..5ce7037bc9 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -50,10 +50,7 @@ jobs: path: | ~/.cabal/packages ~/.cabal/store - restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - v2-${{ runner.os }}-${{ matrix.ghc }}-build- - v2-${{ runner.os }}-${{ matrix.ghc }} + restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- - run: cabal update diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index faf62a9c61..b116e994bb 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -97,10 +97,7 @@ jobs: ${{ env.CABAL_PKGS_DIR }} ${{ env.CABAL_STORE_DIR }} key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - v2-${{ runner.os }}-${{ matrix.ghc }}-build- - v2-${{ runner.os }}-${{ matrix.ghc }} + restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- - run: cabal update diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f0412c299..5104b68560 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,10 +122,7 @@ jobs: path: | ${{ env.CABAL_PKGS_DIR }} ${{ env.CABAL_STORE_DIR }} - key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-build- - v2-${{ runner.os }}-${{ matrix.ghc }} + restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- - run: cabal update From dd2d5ed6a711bffa7b9555148494aad6b4aad4bc Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 17:07:31 +0200 Subject: [PATCH 04/54] CI: {cache-deps,test}: mk workaround as Windows-only Doing match in this way - ensures it works for all Windows configured, not only `windows-latest` case. --- .github/workflows/cache-deps.yml | 5 +++-- .github/workflows/test.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index b116e994bb..4318666c7f 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -101,8 +101,9 @@ jobs: - run: cabal update - # Need this to work around filepath length limits in Windows - - name: Shorten binary names + # Work around for filepath length limits in Windows + - if: ${{ env.RUNNER_OS }} == 'Windows' + name: Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5104b68560..a783d53ce6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,8 +126,9 @@ jobs: - run: cabal update - # Need this to work around filepath length limits in Windows - - name: Shorten binary names + # Work around for filepath length limits in Windows + - if: ${{ env.RUNNER_OS }} == 'Windows' + name: Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ From 1385cb228d2892a8d03f62bf9f2a69d765853bf0 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 17:21:07 +0200 Subject: [PATCH 05/54] CI: test: mk some platform-specific setup declarative `!= 'windows-latest` may mean not latest or not windows, but the setup is for Linux & macOS. --- .github/workflows/cache-deps.yml | 4 ++-- .github/workflows/test.yml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 4318666c7f..9f365aa002 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -65,8 +65,8 @@ jobs: echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: matrix.os != 'windows-latest' - name: Set some linux/macOS specific things + - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') + name: Set some Linux/macOS specific things run: | echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a783d53ce6..15f3d2adf0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,14 +85,15 @@ jobs: - run: ./fmt.sh name: "HLint via ./fmt.sh" - - if: matrix.os == 'windows-latest' + - if: ${{ env.RUNNER_OS }} == 'Windows' name: Set some window specific things run: | echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: matrix.os != 'windows-latest' - name: Set some linux/macOS specific things + + - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') + name: Set some Linux/macOS specific things run: | echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV From 7503f2a1eb70cd72bc5962208921149373d399f9 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 17:36:54 +0200 Subject: [PATCH 06/54] CI: use Cabal Store env variable that alredy provided by default In & below: https://github.com/haskell/actions/blob/45e670e88ef506f3c7c305ffa3abbf1c08a38d63/setup/lib/setup-haskell.js#L61 is seen that it is exact Windows & Linux & macOS settings. No need to guess with matching the CABAL_STORE variable to reality, while haskell action already gives the value of that variable. --- .github/workflows/cache-deps.yml | 6 +++--- .github/workflows/test.yml | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 9f365aa002..522a8b15ee 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -54,7 +54,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - uses: haskell/actions/setup@v1 + id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" @@ -62,13 +64,11 @@ jobs: - if: matrix.os == 'windows-latest' name: Set some window specific things run: | - echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') name: Set some Linux/macOS specific things run: | - echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' @@ -94,8 +94,8 @@ jobs: cache-name: cache-cabal with: path: | + ${{ steps.HaskEnvSetup.outputs.cabal-store }} ${{ env.CABAL_PKGS_DIR }} - ${{ env.CABAL_STORE_DIR }} key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15f3d2adf0..2989be4d82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,6 +78,7 @@ jobs: with: submodules: true - uses: haskell/actions/setup@v1 + id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" @@ -88,14 +89,12 @@ jobs: - if: ${{ env.RUNNER_OS }} == 'Windows' name: Set some window specific things run: | - echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') name: Set some Linux/macOS specific things run: | - echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' @@ -121,8 +120,8 @@ jobs: cache-name: cache-cabal with: path: | + ${{ steps.HaskEnvSetup.outputs.cabal-store }} ${{ env.CABAL_PKGS_DIR }} - ${{ env.CABAL_STORE_DIR }} restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- - run: cabal update From 87ec9e270331b5c296715c5a6a7c15ee48d8c143 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 17:48:37 +0200 Subject: [PATCH 07/54] CI: cache-deps: rm skip intended for `master`<->PR merge skip This workflow it intended to be run on `master` only. & to run after every merge to rebuid the cache, as was agreed before While this using this skip action - means that if the same `workflow` was present in the PR - the workflow would not run inside `master`, so: 1. this code is not needed in this workflow. 2. this code may work against the agenda of the workflow. So, lets just simplify things here. --- .github/workflows/cache-deps.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 522a8b15ee..bd66048610 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -20,27 +20,8 @@ on: - cron: "25 8 * * *" jobs: - pre_job: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - should_skip_ghcide: ${{ steps.skip_ghcide_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v3.4.1 - with: - cancel_others: false - paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml", ".circleci/**"]' - # If we only change ghcide downstream packages we have not test ghcide itself - - id: skip_ghcide_check - uses: fkirc/skip-duplicate-actions@v3.4.1 - with: - cancel_others: false - paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' deps: - if: needs.pre_job.outputs.should_skip != 'true' - needs: pre_job runs-on: ${{ matrix.os }} strategy: matrix: From a83d23746bfdc7b7dfc5f09e21a8ad45a4907364 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 17:57:54 +0200 Subject: [PATCH 08/54] CI: {cache-deps,test}: run build multiple times only for Windows --- .github/workflows/cache-deps.yml | 8 ++++++-- .github/workflows/test.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index bd66048610..a41f2de378 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -92,6 +92,10 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs - # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build - run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + + # repeating builds to workaround segfaults in windows and ghc-8.8.4 + - if: ${{ env.RUNNER_OS }} == 'Windows' + name: In Windows run build additional 2 times + run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2989be4d82..ea99d4de91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -136,9 +136,13 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs - # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build - run: cabal build || cabal build || cabal build + run: cabal v2-build + + # repeating builds to workaround segfaults in windows and ghc-8.8.4 + - if: ${{ env.RUNNER_OS }} == 'Windows' + name: In Windows run build additional 2 times + run: cabal v2-build || cabal v2-build - name: Set test options run: | From 55a06652f4d2d4266d51d8c29d955e9613ce17c3 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 18:18:23 +0200 Subject: [PATCH 09/54] CI: cache-deps: cache successes in the matrix Before this - whole matrix aborted on 1 build fail in it: https://github.com/haskell/haskell-language-server/runs/4383942120?check_suite_focus=true --- .github/workflows/cache-deps.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index a41f2de378..3b5eaa5ac7 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -24,6 +24,7 @@ jobs: deps: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: ghc: ["9.0.1", '8.10.7', '8.10.6', "8.10.5", "8.8.4", "8.8.3", "8.6.5"] os: [ubuntu-latest, macOS-latest, windows-latest] From c597920fb5ce480a7ff3ed3b5e31775e4e60f6be Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 18:35:39 +0200 Subject: [PATCH 10/54] CI: {cache-deps,test}: fix expressions & org platform step names --- .github/workflows/cache-deps.yml | 16 ++++++++-------- .github/workflows/test.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 3b5eaa5ac7..cc6e24d17d 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -43,13 +43,13 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" - - if: matrix.os == 'windows-latest' - name: Set some window specific things + - if: runner.os == 'Windows' + name: (Windows) Platform config run: | echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') - name: Set some Linux/macOS specific things + - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) + name: (Linux,macOS) Platform config run: | echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV @@ -84,8 +84,8 @@ jobs: - run: cabal update # Work around for filepath length limits in Windows - - if: ${{ env.RUNNER_OS }} == 'Windows' - name: Shorten binary names + - if: runner.os == 'Windows' + name: (Windows) Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ @@ -97,6 +97,6 @@ jobs: run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies # repeating builds to workaround segfaults in windows and ghc-8.8.4 - - if: ${{ env.RUNNER_OS }} == 'Windows' - name: In Windows run build additional 2 times + - if: runner.os == 'Windows' + name: (Windows) Run build additional 2 times run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea99d4de91..58f05a1eba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,14 +86,14 @@ jobs: - run: ./fmt.sh name: "HLint via ./fmt.sh" - - if: ${{ env.RUNNER_OS }} == 'Windows' - name: Set some window specific things + - if: runner.os == 'Windows' + name: (Windows) Platform config run: | echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS') - name: Set some Linux/macOS specific things + - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) + name: (Linux,macOS) Platform config run: | echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV @@ -127,8 +127,8 @@ jobs: - run: cabal update # Work around for filepath length limits in Windows - - if: ${{ env.RUNNER_OS }} == 'Windows' - name: Shorten binary names + - if: runner.os == 'Windows' + name: (Windows) Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ @@ -140,8 +140,8 @@ jobs: run: cabal v2-build # repeating builds to workaround segfaults in windows and ghc-8.8.4 - - if: ${{ env.RUNNER_OS }} == 'Windows' - name: In Windows run build additional 2 times + - if: runner.os == 'Windows' + name: (Windows) Run build additional 2 times run: cabal v2-build || cabal v2-build - name: Set test options From 31164ba3be9ed2c90902b522a7354cf2b32ace88 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 19:46:15 +0200 Subject: [PATCH 11/54] CI: remove GHC 8.10.5 from builds Since HLS 1.6 would not support this version - this check can be removed. --- .github/workflows/build.yml | 8 +------- .github/workflows/cache-deps.yml | 8 +------- .github/workflows/test.yml | 10 +--------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3d9d6824a..b7c50e23e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['9.0.1', '8.10.7', '8.10.6', '8.10.5', '8.8.4', '8.8.3', '8.6.5'] + ghc: ['9.0.1', '8.10.7', '8.10.6', '8.8.4', '8.8.3', '8.6.5'] os: [ubuntu-18.04, macOS-latest, windows-latest] exclude: - os: windows-latest @@ -68,12 +68,6 @@ jobs: run: | echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV - - name: Workaround for GHC 8.10.5 on macOS - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' - run: | - echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)" - sudo rm -rf /Library/Developer/CommandLineTools - - name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' run: | diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index cc6e24d17d..21072affd8 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["9.0.1", '8.10.7', '8.10.6', "8.10.5", "8.8.4", "8.8.3", "8.6.5"] + ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] os: [ubuntu-latest, macOS-latest, windows-latest] exclude: - os: windows-latest @@ -53,12 +53,6 @@ jobs: run: | echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' - name: Workaround for GHC 8.10.5 on macOS - run: | - echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)" - sudo rm -rf /Library/Developer/CommandLineTools - # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - if: matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58f05a1eba..a5e4e75910 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: true matrix: - ghc: ["9.0.1", '8.10.7', '8.10.6', "8.10.5", "8.8.4", "8.8.3", "8.6.5"] + ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] os: [ubuntu-latest, macOS-latest] include: # only test supported ghc major versions @@ -68,8 +68,6 @@ jobs: # only build rest of supported ghc versions for windows - os: windows-latest ghc: '8.10.6' - - os: windows-latest - ghc: '8.10.5' - os: windows-latest ghc: '8.8.4' @@ -97,12 +95,6 @@ jobs: run: | echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' - name: Workaround for GHC 8.10.5 on macOS - run: | - echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)" - sudo rm -rf /Library/Developer/CommandLineTools - # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - if: matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 From 2404163f1dc6f9179c29f5104b7ca6e762de7b47 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 23:23:56 +0200 Subject: [PATCH 12/54] CI: cache-deps: rm build scheduling --- .github/workflows/cache-deps.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 21072affd8..9f8ba1c912 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -15,9 +15,6 @@ on: push: branches: - master - schedule: - # Try to save snapshot every day at 08:25 UTC (~00:25 in California) - - cron: "25 8 * * *" jobs: From 5a1361cf9057aacd9ac4621a875e178bdf824c7d Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 19:10:47 +0200 Subject: [PATCH 13/54] CI: cache-deps: caching the sources separately --- .github/workflows/cache-deps.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 9f8ba1c912..c239449406 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -64,13 +64,20 @@ jobs: - name: Cache Cabal uses: actions/cache@v2 env: - cache-name: cache-cabal + cache-name: hackage-sources with: - path: | - ${{ steps.HaskEnvSetup.outputs.cabal-store }} - ${{ env.CABAL_PKGS_DIR }} - key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} - restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- + path: ${{ env.CABAL_PKGS_DIR }} + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}- + + - name: Cache Cabal + uses: actions/cache@v2 + env: + cache-name: compiled-deps + with: + path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}- - run: cabal update From 0c37672f5cf9f1591eb06d905223c9415a52aeea Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 03:27:04 +0200 Subject: [PATCH 14/54] CI: cache-deps: update caching keys --- .github/workflows/cache-deps.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index c239449406..5012ed3340 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -24,6 +24,7 @@ jobs: fail-fast: false matrix: ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] + cabal: ["3.4"] os: [ubuntu-latest, macOS-latest, windows-latest] exclude: - os: windows-latest @@ -38,7 +39,7 @@ jobs: id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} - cabal-version: "3.4" + cabal-version: ${{ matrix.cabal }} - if: runner.os == 'Windows' name: (Windows) Platform config @@ -61,25 +62,25 @@ jobs: echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project - - name: Cache Cabal + - name: Hackage sources cache uses: actions/cache@v2 env: cache-name: hackage-sources with: path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}- + key: ${{ env.cache-name }}-${{ hashFiles('cabal.project') }} + restore-keys: ${{ env.cache-name }}- - - name: Cache Cabal + - name: Compiled deps cache uses: actions/cache@v2 env: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}- + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project') }} + restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - - run: cabal update + - run: cabal v2-update # Work around for filepath length limits in Windows - if: runner.os == 'Windows' From 36411b51e080c891f4f64db7d3b245ee427ea892 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 03:28:40 +0200 Subject: [PATCH 15/54] CI: cache-deps: mk src caching depend on pinned Hackage timestamp --- .github/workflows/cache-deps.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 5012ed3340..8563ddba43 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -62,25 +62,32 @@ jobs: echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project + - name: Retrieving `cabal.project` Hackage timestamp + run: | + TIMESTAMP="$(grep index-state cabal.project)" + echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + - name: Hackage sources cache uses: actions/cache@v2 env: cache-name: hackage-sources with: path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ env.cache-name }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} restore-keys: ${{ env.cache-name }}- + - run: cabal v2-update + - name: Compiled deps cache uses: actions/cache@v2 env: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project') }} - restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - - - run: cabal v2-update + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- # Work around for filepath length limits in Windows - if: runner.os == 'Windows' From ea92a92eba5285a4017d9ffa0db46decef906dcd Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 03:47:14 +0200 Subject: [PATCH 16/54] CI: cache-deps: mv workaround for Windows before analyzing cabal.project --- .github/workflows/cache-deps.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 8563ddba43..16cc3ebf7d 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -62,6 +62,16 @@ jobs: echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project + # Work around for filepath length limits in Windows + - if: runner.os == 'Windows' + name: (Windows) Shorten binary names + run: | + sed -i.bak -e 's/haskell-language-server/hls/g' \ + -e 's/haskell_language_server/hls/g' \ + haskell-language-server.cabal cabal.project + sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ + src/**/*.hs exe/*.hs + - name: Retrieving `cabal.project` Hackage timestamp run: | TIMESTAMP="$(grep index-state cabal.project)" @@ -89,16 +99,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - # Work around for filepath length limits in Windows - - if: runner.os == 'Windows' - name: (Windows) Shorten binary names - run: | - sed -i.bak -e 's/haskell-language-server/hls/g' \ - -e 's/haskell_language_server/hls/g' \ - haskell-language-server.cabal cabal.project - sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ - src/**/*.hs exe/*.hs - - name: Build run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies From c1446634915f3da74fc118c5351dca604934806a Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 03:49:06 +0200 Subject: [PATCH 17/54] CI: cache-deps: standartize if expressions & names --- .github/workflows/cache-deps.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 16cc3ebf7d..9338233b6f 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -53,11 +53,11 @@ jobs: # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - if: matrix.ghc == '9.0.1' - name: Use modified cabal.project for ghc9 + name: (GHC 9.0.1) Use modified `cabal.project` run: cp cabal-ghc901.project cabal.project - - if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' - name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows + - if: runner.os == 'Windows' && matrix.ghc == '8.8.4' + name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults run: | echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project @@ -104,5 +104,5 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 - if: runner.os == 'Windows' - name: (Windows) Run build additional 2 times + name: (Windows) Run build 2 additional times run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies From c6506faf204a72eb8453b8cf925b33d7e366813e Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 00:44:39 +0200 Subject: [PATCH 18/54] CI: cache-deps: platforms need separate build steps Otherwise Windows was failing the first time & not proceeding to retry. --- .github/workflows/cache-deps.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 9338233b6f..ac41916dbd 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -99,10 +99,12 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - - name: Build + - if: runner.os != 'Windows' + name: Build run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies # repeating builds to workaround segfaults in windows and ghc-8.8.4 + # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - if: runner.os == 'Windows' - name: (Windows) Run build 2 additional times - run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + name: (Windows) Restart build 3 times + run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies From 73fa0449a2f12aae0fcefb4f0bbd41aed429f67c Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 01:02:17 +0200 Subject: [PATCH 19/54] CI: cache-deps: GHC 8.6.5 build does not handle all deps at once --- .github/workflows/cache-deps.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index ac41916dbd..210da161d0 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -99,12 +99,20 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - - if: runner.os != 'Windows' + - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: Build run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - - if: runner.os == 'Windows' + - if: runner.os == 'Windows' && ( matrix.ghc != '8.6.5' ) name: (Windows) Restart build 3 times run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + + - if: ( runner.os != 'Windows' ) && ( matrix.ghc == '8.6.5' ) + name: Build + run: cabal v2-build --only-dependencies + + - if: ( runner.os == 'Windows' ) && ( matrix.ghc == '8.6.5' ) + name: Build + run: cabal v2-build --only-dependencies || cabal v2-build --only-dependencies || cabal v2-build --only-dependencies From e6d416851d74cee4973093da31a1a1103f98d339 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 03:14:38 +0200 Subject: [PATCH 20/54] CI: cache-deps: add note on source caching --- .github/workflows/cache-deps.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 210da161d0..f6241d75ff 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -77,6 +77,11 @@ jobs: TIMESTAMP="$(grep index-state cabal.project)" echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, + # but can depend on `base`. + # But this caching is happens only inside `master` for `master` purposes of compiling the deps + # so having a shared pool here that depends only on Hackage pin & does not depend on `base` is "good enough" + # & used such because it preserves 10% of a global cache storage pool. - name: Hackage sources cache uses: actions/cache@v2 env: @@ -98,6 +103,7 @@ jobs: restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: Build From a37edbbe816013ecd48e7cea17c920ba22b1086d Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 1 Dec 2021 23:24:34 +0200 Subject: [PATCH 21/54] WIP: remove this one before merge --- .github/workflows/cache-deps.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index f6241d75ff..c005a5d3ed 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -15,6 +15,9 @@ on: push: branches: - master + pull_request: + branches: + - '**' jobs: From 6e4e660fa74fa90e0b3abbb8ece28375d6fc0da3 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 04:19:47 +0200 Subject: [PATCH 22/54] CI: test: add new caching mechanism --- .github/workflows/cache-deps.yml | 8 +++--- .github/workflows/test.yml | 46 +++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index c005a5d3ed..7c4bebdc0c 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -102,11 +102,11 @@ jobs: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: Build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5e4e75910..a942837675 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,7 +95,6 @@ jobs: run: | echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - if: matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 run: cp cabal-ghc901.project cabal.project @@ -106,18 +105,6 @@ jobs: echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project - - name: Cache Cabal - uses: actions/cache@v2 - env: - cache-name: cache-cabal - with: - path: | - ${{ steps.HaskEnvSetup.outputs.cabal-store }} - ${{ env.CABAL_PKGS_DIR }} - restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- - - - run: cabal update - # Work around for filepath length limits in Windows - if: runner.os == 'Windows' name: (Windows) Shorten binary names @@ -128,6 +115,39 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs + - name: Retrieving `cabal.project` Hackage timestamp + run: | + TIMESTAMP="$(grep index-state cabal.project)" + echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + + # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, + # but can depend on `base`. + # But this caching is happens only inside `master` for `master` purposes of compiling the deps + # so having a shared pool here that depends only on Hackage pin & does not depend on `base` is "good enough" + # & used such because it preserves 10% of a global cache storage pool. + - name: Hackage sources cache + uses: actions/cache@v2 + env: + cache-name: hackage-sources + with: + path: ${{ env.CABAL_PKGS_DIR }} + key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} + restore-keys: ${{ env.cache-name }}- + + - run: cabal v2-update + + - name: Compiled deps cache + uses: actions/cache@v2 + env: + cache-name: compiled-deps + with: + path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + - name: Build run: cabal v2-build From a0eff12aa0aea1eee0949fb210068a8e016674d6 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 04:20:20 +0200 Subject: [PATCH 23/54] CI: test: test-log update This at all needs to be an artifact. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a942837675..2bc620ba11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,10 +163,10 @@ jobs: - name: Cache test log bewteen attempts of the same run uses: actions/cache@v2 env: - cache-name: cache-test-log + cache-name: test-log with: path: .tasty-rerun-log - key: v1-${{ runner.os }}-${{ matrix.ghc }}-test-log-${{ github.sha }} + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ github.sha }} - if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test name: Test ghcide From c9bdd61aad5b6a6a5e54e3856560ed3ef5864ecd Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 04:26:44 +0200 Subject: [PATCH 24/54] CI: test: m fx Basically since I can not force the restart of the CI builds (this step failed). --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2bc620ba11..35ade913b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,8 +81,8 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" - - run: ./fmt.sh - name: "HLint via ./fmt.sh" + - name: "HLint via ./fmt.sh" + run: ./fmt.sh - if: runner.os == 'Windows' name: (Windows) Platform config From f9d2e36bfd54f5e565bca813e820c2a6518a9300 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 05:08:56 +0200 Subject: [PATCH 25/54] CI: cache-deps: cache source deps for all targets --- .github/workflows/cache-deps.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 7c4bebdc0c..64aa26d8f8 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -110,7 +110,13 @@ jobs: - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: Build - run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + # 2021-12-02: NOTE: After HLS Cabal 3.6 support - add: + # + # cabal v2-build --enable-tests --enable-benchmarks --only-download + # # ^ To download deps for everything. + run: | + cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + # ^ To target build only deps. # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. From f8cdcc1e9fc62b2b8fe05747801c8047ddd4d719 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 13:22:43 +0200 Subject: [PATCH 26/54] CI: bench: update caching code --- .github/workflows/bench.yml | 46 ++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 5ce7037bc9..55528d83cc 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -39,20 +39,54 @@ jobs: - run: git fetch origin master # check the master branch for benchmarking - uses: haskell/actions/setup@v1 + id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' enable-stack: false - - name: Cache Cabal + - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) + name: (Linux,macOS) Platform config + run: | + echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV + + # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file + - if: matrix.ghc == '9.0.1' + name: (GHC 9.0.1) Use modified `cabal.project` + run: cp cabal-ghc901.project cabal.project + + - name: Retrieving `cabal.project` Hackage timestamp + run: | + TIMESTAMP="$(grep index-state cabal.project)" + echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + + # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, + # but can depend on `base`. + # But this caching is happens only inside `master` for `master` purposes of compiling the deps + # so having a shared pool here that depends only on Hackage pin & does not depend on `base` is "good enough" + # & used such because it preserves 10% of a global cache storage pool. + - name: Hackage sources cache uses: actions/cache@v2 + env: + cache-name: hackage-sources with: - path: | - ~/.cabal/packages - ~/.cabal/store - restore-keys: v2-${{ runner.os }}-${{ matrix.ghc }}-build- + path: ${{ env.CABAL_PKGS_DIR }} + key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} + restore-keys: ${{ env.cache-name }}- + + - run: cabal v2-update - - run: cabal update + - name: Compiled deps cache + uses: actions/cache@v2 + env: + cache-name: compiled-deps + with: + path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- # max-backjumps is increased as a temporary solution # for dependency resolution failure From 29e80392e8563f8935e4d58c0b1ca4b9063bbb29 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 13:49:34 +0200 Subject: [PATCH 27/54] CI: update everything to Cabal 3.6 --- .github/workflows/bench.yml | 3 ++- .github/workflows/build.yml | 3 ++- .github/workflows/cache-deps.yml | 2 +- .github/workflows/hackage.yml | 3 ++- .github/workflows/test.yml | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 55528d83cc..79e81f5d75 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -31,6 +31,7 @@ jobs: fail-fast: false matrix: ghc: ['8.10.7'] + cabal: ["3.6"] os: [ubuntu-latest] steps: @@ -42,7 +43,7 @@ jobs: id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} - cabal-version: '3.2' + cabal-version: ${{ matrix.cabal }} enable-stack: false - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7c50e23e6..e5098384e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: fail-fast: false matrix: ghc: ['9.0.1', '8.10.7', '8.10.6', '8.8.4', '8.8.3', '8.6.5'] + cabal: ["3.6"] os: [ubuntu-18.04, macOS-latest, windows-latest] exclude: - os: windows-latest @@ -31,7 +32,7 @@ jobs: - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} - cabal-version: '3.4' + cabal-version: ${{ matrix.cabal }} - name: Use modified cabal.project for ghc9 if: ${{ matrix.ghc == '9.0.1' }} diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 64aa26d8f8..8df6e86f3b 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] - cabal: ["3.4"] + cabal: ["3.6"] os: [ubuntu-latest, macOS-latest, windows-latest] exclude: - os: windows-latest diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index a5c143dd78..7efc0e02d4 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -33,6 +33,7 @@ jobs: "8.10.7", "8.8.4", "8.6.5"] + cabal: ["3.6"] exclude: - ghc: "9.0.1" package: "hls-brittany-plugin" @@ -52,7 +53,7 @@ jobs: - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} - cabal-version: '3.4' + cabal-version: ${{ matrix.cabal }} - name: Cache Cabal uses: actions/cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35ade913b8..492191c5a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,7 @@ jobs: fail-fast: true matrix: ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] + cabal: ["3.6"] os: [ubuntu-latest, macOS-latest] include: # only test supported ghc major versions @@ -79,7 +80,7 @@ jobs: id: HaskEnvSetup with: ghc-version: ${{ matrix.ghc }} - cabal-version: "3.4" + cabal-version: ${{ matrix.cabal }} - name: "HLint via ./fmt.sh" run: ./fmt.sh From 8074db60d22eca3ed4d872866be4978817c3e6b7 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 13:54:15 +0200 Subject: [PATCH 28/54] CI: cache-deps: after 3.6 use sources for everything can be cached --- .github/workflows/cache-deps.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 8df6e86f3b..4e1d22d5b7 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -110,13 +110,11 @@ jobs: - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: Build - # 2021-12-02: NOTE: After HLS Cabal 3.6 support - add: - # - # cabal v2-build --enable-tests --enable-benchmarks --only-download - # # ^ To download deps for everything. run: | + # Download dep sources for all targets. + cabal v2-build --enable-tests --enable-benchmarks --only-download + # Build only dep targets. cabal v2-build --enable-tests --enable-benchmarks --only-dependencies - # ^ To target build only deps. # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. From 941e1e0402f4889032e431b72d242467ef67490f Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 14:21:58 +0200 Subject: [PATCH 29/54] CI: cache-deps: build all subprojects & targets --- .github/workflows/cache-deps.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache-deps.yml index 4e1d22d5b7..47ac5b0e91 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache-deps.yml @@ -108,24 +108,25 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: Download all sources + run: | + cabal v2-build all --only-download + - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) - name: Build + name: (Default) Build all targets run: | - # Download dep sources for all targets. - cabal v2-build --enable-tests --enable-benchmarks --only-download - # Build only dep targets. - cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + cabal v2-build all # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - if: runner.os == 'Windows' && ( matrix.ghc != '8.6.5' ) - name: (Windows) Restart build 3 times - run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + name: (Windows) Build only dep targets; Restart build 3 times + run: cabal v2-build all || cabal v2-build all || cabal v2-build all - if: ( runner.os != 'Windows' ) && ( matrix.ghc == '8.6.5' ) - name: Build + name: (!Windows,8.6.5) Build only dep targets run: cabal v2-build --only-dependencies - if: ( runner.os == 'Windows' ) && ( matrix.ghc == '8.6.5' ) - name: Build + name: (Windows,8.6.5) run: cabal v2-build --only-dependencies || cabal v2-build --only-dependencies || cabal v2-build --only-dependencies From 0e9f2310ffb5fa103c1d60db8c7222ff9ac2e471 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 14:33:11 +0200 Subject: [PATCH 30/54] CI: cache(-deps->).yml --- .github/workflows/{cache-deps.yml => cache.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{cache-deps.yml => cache.yml} (99%) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/cache.yml similarity index 99% rename from .github/workflows/cache-deps.yml rename to .github/workflows/cache.yml index 47ac5b0e91..cf067c3979 100644 --- a/.github/workflows/cache-deps.yml +++ b/.github/workflows/cache.yml @@ -1,4 +1,4 @@ -name: Caching of dependencies +name: Caching # 2021-11-30: NOTE: This workflow currently a trimmed copy of a main `test.yml` workflow. Workflows need further deduplication: https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview From 60a04f35bed896767f8646714c44c028203d48cc Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 14:47:02 +0200 Subject: [PATCH 31/54] CI: add dist-newstyle cache Since we now build all targets here - we may as well cache the `dist-newstyle` here. --- .github/workflows/cache.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index cf067c3979..1cee5fb0ec 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -108,6 +108,18 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: dist-newstyle + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + - name: Download all sources run: | cabal v2-build all --only-download From 71e73e72a61781edfa358d2512a3440d3c203bee Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 17:14:46 +0200 Subject: [PATCH 32/54] CI: cache: just cache results --- .github/workflows/cache.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1cee5fb0ec..adadaaa0d2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -126,6 +126,8 @@ jobs: - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) name: (Default) Build all targets + # If some builds not passed, atill cache what is available. + continue-on-error: true run: | cabal v2-build all @@ -133,12 +135,15 @@ jobs: # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - if: runner.os == 'Windows' && ( matrix.ghc != '8.6.5' ) name: (Windows) Build only dep targets; Restart build 3 times + continue-on-error: true run: cabal v2-build all || cabal v2-build all || cabal v2-build all - if: ( runner.os != 'Windows' ) && ( matrix.ghc == '8.6.5' ) name: (!Windows,8.6.5) Build only dep targets + continue-on-error: true run: cabal v2-build --only-dependencies - if: ( runner.os == 'Windows' ) && ( matrix.ghc == '8.6.5' ) name: (Windows,8.6.5) + continue-on-error: true run: cabal v2-build --only-dependencies || cabal v2-build --only-dependencies || cabal v2-build --only-dependencies From 7a586a42ee9e972436af0f3eb471c33c1a9c3e77 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 17:16:25 +0200 Subject: [PATCH 33/54] cabal.project: advance index +1 second to reinit cache --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 90c322cc4f..102d9137a8 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:08Z constraints: hyphenation +embed From 51e8a47286ac7d0ca9cff0616e9e73d4ab8c2aed Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Thu, 2 Dec 2021 18:43:47 +0200 Subject: [PATCH 34/54] CI: update cache indexes & use new code --- .github/workflows/bench.yml | 25 +++++++++++++---- .github/workflows/cache.yml | 17 +++++++----- .github/workflows/hackage.yml | 52 +++++++++++++++++++++++++++++------ .github/workflows/test.yml | 26 ++++++++++++++---- 4 files changed, 93 insertions(+), 27 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 79e81f5d75..ddd9849289 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -58,8 +58,11 @@ jobs: - name: Retrieving `cabal.project` Hackage timestamp run: | - TIMESTAMP="$(grep index-state cabal.project)" - echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + # Form: index-state: 2021-11-29T08:11:08Z + INDEX_STATE_ENTRY=$(grep index-state cabal.project) + # Form: 2021-11-29T08-11-08Z + INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') + echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, # but can depend on `base`. @@ -72,7 +75,7 @@ jobs: cache-name: hackage-sources with: path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} + key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - run: cabal v2-update @@ -83,9 +86,21 @@ jobs: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: dist-newstyle + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index adadaaa0d2..35e35e2e8b 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -77,8 +77,11 @@ jobs: - name: Retrieving `cabal.project` Hackage timestamp run: | - TIMESTAMP="$(grep index-state cabal.project)" - echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + # Form: index-state: 2021-11-29T08:11:08Z + INDEX_STATE_ENTRY=$(grep index-state cabal.project) + # Form: 2021-11-29T08-11-08Z + INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') + echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, # but can depend on `base`. @@ -91,7 +94,7 @@ jobs: cache-name: hackage-sources with: path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} + key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - run: cabal v2-update @@ -102,9 +105,9 @@ jobs: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- @@ -114,9 +117,9 @@ jobs: cache-name: dist-newstyle with: path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index 7efc0e02d4..2855af81ee 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -55,19 +55,53 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Cache Cabal + - name: Retrieving `cabal.project` Hackage timestamp + run: | + # Form: index-state: 2021-11-29T08:11:08Z + INDEX_STATE_ENTRY=$(grep index-state cabal.project) + # Form: 2021-11-29T08-11-08Z + INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') + echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV + + # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, + # but can depend on `base`. + # But this caching is happens only inside `master` for `master` purposes of compiling the deps + # so having a shared pool here that depends only on Hackage pin & does not depend on `base` is "good enough" + # & used such because it preserves 10% of a global cache storage pool. + - name: Hackage sources cache + uses: actions/cache@v2 + env: + cache-name: hackage-sources + with: + path: ${{ env.CABAL_PKGS_DIR }} + key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} + restore-keys: ${{ env.cache-name }}- + + - run: cabal v2-update + + - name: Compiled deps cache + uses: actions/cache@v2 + env: + cache-name: compiled-deps + with: + path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + + - name: dist-newstyle cache uses: actions/cache@v2 env: - cache-name: cache-cabal + cache-name: dist-newstyle with: - path: | - ~/.cabal/packages - ~/.cabal/store - key: v2-${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} + path: dist-newstyle + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | - v2-${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} - v2-${{ runner.os }}-${{ matrix.ghc }}-build- - v2-${{ runner.os }}-${{ matrix.ghc }} + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- - name: "Run cabal check" run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 492191c5a2..1fc236b906 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,7 +90,6 @@ jobs: run: | echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) name: (Linux,macOS) Platform config run: | @@ -118,8 +117,11 @@ jobs: - name: Retrieving `cabal.project` Hackage timestamp run: | - TIMESTAMP="$(grep index-state cabal.project)" - echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV + # Form: index-state: 2021-11-29T08:11:08Z + INDEX_STATE_ENTRY=$(grep index-state cabal.project) + # Form: 2021-11-29T08-11-08Z + INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') + echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, # but can depend on `base`. @@ -132,7 +134,7 @@ jobs: cache-name: hackage-sources with: path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }} + key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - run: cabal v2-update @@ -143,9 +145,21 @@ jobs: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: dist-newstyle + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- From c3a651c93070ee9e050f2bb055c5dfb43d4567b9 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 01:03:20 +0200 Subject: [PATCH 35/54] CI: cache: include test & benchmarks build --- .github/workflows/cache.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 35e35e2e8b..ecd41e0205 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -19,6 +19,9 @@ on: branches: - '**' +env: + cabalBuild: "v2-build all --enable-tests --enable-benchmarks" + jobs: deps: @@ -125,28 +128,18 @@ jobs: - name: Download all sources run: | - cabal v2-build all --only-download + cabal $cabalBuild --only-download - - if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' ) + - if: runner.os != 'Windows' name: (Default) Build all targets # If some builds not passed, atill cache what is available. continue-on-error: true run: | - cabal v2-build all + cabal $cabalBuild # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - - if: runner.os == 'Windows' && ( matrix.ghc != '8.6.5' ) + - if: runner.os == 'Windows' name: (Windows) Build only dep targets; Restart build 3 times continue-on-error: true - run: cabal v2-build all || cabal v2-build all || cabal v2-build all - - - if: ( runner.os != 'Windows' ) && ( matrix.ghc == '8.6.5' ) - name: (!Windows,8.6.5) Build only dep targets - continue-on-error: true - run: cabal v2-build --only-dependencies - - - if: ( runner.os == 'Windows' ) && ( matrix.ghc == '8.6.5' ) - name: (Windows,8.6.5) - continue-on-error: true - run: cabal v2-build --only-dependencies || cabal v2-build --only-dependencies || cabal v2-build --only-dependencies + run: cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild From 63fa0f7caaf3bb9baf9354ca27f85bd2e62d26da Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 01:05:03 +0200 Subject: [PATCH 36/54] cabal.project: advance index-state +1s --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 102d9137a8..6cdf417a56 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:08Z +index-state: 2021-11-29T08:11:09Z constraints: hyphenation +embed From 256cf977dddccde4267b4a785ae0458d124a38a1 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 01:10:36 +0200 Subject: [PATCH 37/54] CI: rm dist-newstyle Each `dist-newstyle` takes ~ >700Mb, having 17 builds to cache in matrix - it means that 10Gb pool would already start to delete other caches. --- .github/workflows/bench.yml | 12 ------------ .github/workflows/cache.yml | 12 ------------ .github/workflows/hackage.yml | 12 ------------ .github/workflows/test.yml | 12 ------------ 4 files changed, 48 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ddd9849289..ee547d5c85 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -92,18 +92,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - # max-backjumps is increased as a temporary solution # for dependency resolution failure - run: cabal configure --enable-benchmarks --max-backjumps 12000 diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index ecd41e0205..2055f4cb6d 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -114,18 +114,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - - name: Download all sources run: | cabal $cabalBuild --only-download diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index 2855af81ee..808683e4bc 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -91,18 +91,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - - name: "Run cabal check" run: | if [[ ${{ matrix.package }} == *plugin ]]; then diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1fc236b906..083cc35836 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,18 +151,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - - name: Build run: cabal v2-build From 85f21b7c5e2d76e5aef04199ab46e6a046b648f0 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 01:18:30 +0200 Subject: [PATCH 38/54] cabal.project: advance index-state +1s --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 6cdf417a56..1c5588c6f4 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:09Z +index-state: 2021-11-29T08:11:10Z constraints: hyphenation +embed From f92615e82c773747e37dc07919feafa943c0a57d Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 01:33:28 +0200 Subject: [PATCH 39/54] cabal*.project: advance index-state +1s --- cabal-ghc901.project | 2 +- cabal-ghc921.project | 2 +- cabal.project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index 18e63db8f3..f99560222e 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -37,7 +37,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:11Z constraints: -- These plugins don't work on GHC9 yet diff --git a/cabal-ghc921.project b/cabal-ghc921.project index 5706da094e..26f101857e 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc921.project @@ -36,7 +36,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:11Z constraints: -- These plugins doesn't work on GHC92 yet diff --git a/cabal.project b/cabal.project index 1c5588c6f4..5aa2519a30 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:10Z +index-state: 2021-11-29T08:11:11Z constraints: hyphenation +embed From bc7cf9d597b5105806f7f23e78a5c3c95e1fd656 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 18:20:36 +0200 Subject: [PATCH 40/54] CI: cache: m layout --- .github/workflows/cache.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 2055f4cb6d..fec2c2ac80 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -55,17 +55,18 @@ jobs: - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) name: (Linux,macOS) Platform config run: | - echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV + echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - if: matrix.ghc == '9.0.1' name: (GHC 9.0.1) Use modified `cabal.project` - run: cp cabal-ghc901.project cabal.project + run: | + cp cabal-ghc901.project cabal.project - if: runner.os == 'Windows' && matrix.ghc == '8.8.4' name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults run: | - echo "package floskell" >> cabal.project + echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project # Work around for filepath length limits in Windows @@ -128,6 +129,7 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 # separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed. - if: runner.os == 'Windows' - name: (Windows) Build only dep targets; Restart build 3 times + name: (Windows) Build all targets; Restart build 3 times continue-on-error: true - run: cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild + run: | + cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild From 590e46cf501f87fa2474d989083918ed245a5e8b Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 18:24:40 +0200 Subject: [PATCH 41/54] cabal*.project: advance index-state +1s --- cabal-ghc901.project | 2 +- cabal-ghc921.project | 2 +- cabal.project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index f99560222e..cf61eb327f 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -37,7 +37,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:11Z +index-state: 2021-11-29T08:11:12Z constraints: -- These plugins don't work on GHC9 yet diff --git a/cabal-ghc921.project b/cabal-ghc921.project index 26f101857e..0d4f56cf8c 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc921.project @@ -36,7 +36,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:11Z +index-state: 2021-11-29T08:11:12Z constraints: -- These plugins doesn't work on GHC92 yet diff --git a/cabal.project b/cabal.project index 5aa2519a30..83bdc9d548 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:11Z +index-state: 2021-11-29T08:11:12Z constraints: hyphenation +embed From 361e6e983f356452aa74ed8b739e7a2ba925b33d Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 18:29:15 +0200 Subject: [PATCH 42/54] remove before merge GitHub changed CI behaviour on me. --- .github/workflows/bench.yml | 5 ----- .github/workflows/cache.yml | 5 ----- .github/workflows/hackage.yml | 5 ----- .github/workflows/nix.yml | 5 ----- .github/workflows/test.yml | 5 ----- 5 files changed, 25 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ee547d5c85..c6ea03b70a 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1,10 +1,5 @@ name: Benchmark -# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - on: pull_request: branches: diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index fec2c2ac80..132a3dc752 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -6,11 +6,6 @@ defaults: run: shell: bash -# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - on: push: branches: diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index 808683e4bc..ecac281e15 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -1,10 +1,5 @@ name: Hackage -# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - on: push: branches: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 771c4fbd24..e39071c0ca 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -1,10 +1,5 @@ name: Nix -# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - on: pull_request: branches: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 083cc35836..2c167534c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,6 @@ defaults: run: shell: bash -# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - on: pull_request: branches: From e8f5cba983e30c83fe4da23ba67fe122586d6e01 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 19:56:27 +0200 Subject: [PATCH 43/54] CI: cache: try --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c167534c7..89554d8c1e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -101,8 +101,7 @@ jobs: echo " ghc-options: -O0" >> cabal.project # Work around for filepath length limits in Windows - - if: runner.os == 'Windows' - name: (Windows) Shorten binary names + - name: Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ From 4df40bb122fd08d8d16222d04727d2f170303d6c Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 20:22:18 +0200 Subject: [PATCH 44/54] CI: cache: m fx --- .github/workflows/cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 132a3dc752..83417372e1 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -19,7 +19,7 @@ env: jobs: - deps: + caches: runs-on: ${{ matrix.os }} strategy: fail-fast: false From f84be8f046b41f3fa46e6d11be62ce9c8dbf22cc Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 21:35:11 +0200 Subject: [PATCH 45/54] CI: cache: m fx --- .github/workflows/cache.yml | 3 +-- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 83417372e1..8e527e9aaa 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -65,8 +65,7 @@ jobs: echo " ghc-options: -O0" >> cabal.project # Work around for filepath length limits in Windows - - if: runner.os == 'Windows' - name: (Windows) Shorten binary names + - name: (Windows) Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89554d8c1e..45e1bb8028 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,7 +88,7 @@ jobs: - if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) name: (Linux,macOS) Platform config run: | - echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV + echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - if: matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 @@ -97,7 +97,7 @@ jobs: - if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows run: | - echo "package floskell" >> cabal.project + echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project # Work around for filepath length limits in Windows From 556f5f6e3d0e27aa7c9967cd1c570313906db4c6 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 21:45:31 +0200 Subject: [PATCH 46/54] remove before merge cheating with cache for faster retries --- .github/workflows/bench.yml | 12 ++++++++++++ .github/workflows/cache.yml | 12 ++++++++++++ .github/workflows/hackage.yml | 12 ++++++++++++ .github/workflows/test.yml | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index c6ea03b70a..55880513db 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -87,6 +87,18 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: compiled-deps + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + # max-backjumps is increased as a temporary solution # for dependency resolution failure - run: cabal configure --enable-benchmarks --max-backjumps 12000 diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 8e527e9aaa..c89974634e 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -109,6 +109,18 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: compiled-deps + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + - name: Download all sources run: | cabal $cabalBuild --only-download diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index ecac281e15..787fc22a36 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -86,6 +86,18 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: compiled-deps + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + - name: "Run cabal check" run: | if [[ ${{ matrix.package }} == *plugin ]]; then diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45e1bb8028..9543fd01ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -145,6 +145,18 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - name: dist-newstyle cache + uses: actions/cache@v2 + env: + cache-name: dist-newstyle + with: + path: compiled-deps + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- + ${{ env.cache-name }}-${{ runner.os }}- + - name: Build run: cabal v2-build From 1c72f6abec77a61276c20eefcd05c5b9ad791af8 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 21:53:29 +0200 Subject: [PATCH 47/54] CI: fx update placement Seems like update should run after all caches are loaded. --- .github/workflows/bench.yml | 4 ++-- .github/workflows/cache.yml | 4 ++-- .github/workflows/test.yml | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 55880513db..52e781c3f8 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -73,8 +73,6 @@ jobs: key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - - run: cabal v2-update - - name: Compiled deps cache uses: actions/cache@v2 env: @@ -99,6 +97,8 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - run: cabal v2-update + # max-backjumps is increased as a temporary solution # for dependency resolution failure - run: cabal configure --enable-benchmarks --max-backjumps 12000 diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index c89974634e..7760a887d7 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -95,8 +95,6 @@ jobs: key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - - run: cabal v2-update - - name: Compiled deps cache uses: actions/cache@v2 env: @@ -121,6 +119,8 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- + - run: cabal v2-update + - name: Download all sources run: | cabal $cabalBuild --only-download diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9543fd01ae..d195de28f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -131,8 +131,6 @@ jobs: key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} restore-keys: ${{ env.cache-name }}- - - run: cabal v2-update - - name: Compiled deps cache uses: actions/cache@v2 env: @@ -157,8 +155,9 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: Build - run: cabal v2-build + - run: cabal v2-update + + - run: cabal v2-build # repeating builds to workaround segfaults in windows and ghc-8.8.4 - if: runner.os == 'Windows' From 1d3d89ae40787d2f5dce362657b902276930b839 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 23:11:14 +0200 Subject: [PATCH 48/54] cabal*.project: set back to initial --- cabal-ghc901.project | 2 +- cabal-ghc921.project | 2 +- cabal.project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index cf61eb327f..18e63db8f3 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -37,7 +37,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:12Z +index-state: 2021-11-29T08:11:07Z constraints: -- These plugins don't work on GHC9 yet diff --git a/cabal-ghc921.project b/cabal-ghc921.project index 0d4f56cf8c..5706da094e 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc921.project @@ -36,7 +36,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:12Z +index-state: 2021-11-29T08:11:07Z constraints: -- These plugins doesn't work on GHC92 yet diff --git a/cabal.project b/cabal.project index 83bdc9d548..90c322cc4f 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:12Z +index-state: 2021-11-29T08:11:07Z constraints: hyphenation +embed From 332433df6d5e27d09788411381568c9943857a88 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 23:13:29 +0200 Subject: [PATCH 49/54] remove before merge --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d195de28f1..3d4d7ac411 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -237,6 +237,7 @@ jobs: - if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5') 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" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS" + continue-on-error: true - if: matrix.test name: Test hls-refine-imports-plugin test suite From 1b5e3a57f52352712b7ab8137738174ccf697b57 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 23:21:46 +0200 Subject: [PATCH 50/54] CI: fx dist-newstyle caching path --- .github/workflows/bench.yml | 2 +- .github/workflows/cache.yml | 2 +- .github/workflows/hackage.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 52e781c3f8..e757dddf0f 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -90,7 +90,7 @@ jobs: env: cache-name: dist-newstyle with: - path: compiled-deps + path: dist-newstyle key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 7760a887d7..19a5e09b01 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -112,7 +112,7 @@ jobs: env: cache-name: dist-newstyle with: - path: compiled-deps + path: dist-newstyle key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- diff --git a/.github/workflows/hackage.yml b/.github/workflows/hackage.yml index 787fc22a36..d84c31e8f1 100644 --- a/.github/workflows/hackage.yml +++ b/.github/workflows/hackage.yml @@ -91,7 +91,7 @@ jobs: env: cache-name: dist-newstyle with: - path: compiled-deps + path: dist-newstyle key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d4d7ac411..db49115902 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -148,7 +148,7 @@ jobs: env: cache-name: dist-newstyle with: - path: compiled-deps + path: dist-newstyle key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- From 69fac9def76b0f70983a346d45887f89ed267367 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 3 Dec 2021 23:22:36 +0200 Subject: [PATCH 51/54] cabal*.project: increment index +1s --- cabal-ghc901.project | 2 +- cabal-ghc921.project | 2 +- cabal.project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index 18e63db8f3..ad3245e6a7 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -37,7 +37,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:08Z constraints: -- These plugins don't work on GHC9 yet diff --git a/cabal-ghc921.project b/cabal-ghc921.project index 5706da094e..011fb55257 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc921.project @@ -36,7 +36,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:08Z constraints: -- These plugins doesn't work on GHC92 yet diff --git a/cabal.project b/cabal.project index 90c322cc4f..102d9137a8 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:07Z +index-state: 2021-11-29T08:11:08Z constraints: hyphenation +embed From e49bce834c91355815495c7f944f7a7f07dc552e Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 4 Dec 2021 19:18:32 +0200 Subject: [PATCH 52/54] CI: cache: rm dist-newstyle caching --- .github/workflows/bench.yml | 12 ------------ .github/workflows/cache.yml | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index e757dddf0f..efd00bb858 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -85,18 +85,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - - run: cabal v2-update # max-backjumps is increased as a temporary solution diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 19a5e09b01..8d0d003d48 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -107,18 +107,6 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - name: dist-newstyle cache - uses: actions/cache@v2 - env: - cache-name: dist-newstyle - with: - path: dist-newstyle - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- - ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- - ${{ env.cache-name }}-${{ runner.os }}- - - run: cabal v2-update - name: Download all sources From 194061ac0b528249fcf95618846f41a2e660927e Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 4 Dec 2021 19:19:54 +0200 Subject: [PATCH 53/54] cabal*.project: increment index +1s --- cabal-ghc901.project | 2 +- cabal-ghc921.project | 2 +- cabal.project | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index ad3245e6a7..52dc14e00f 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -37,7 +37,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:08Z +index-state: 2021-11-29T08:11:09Z constraints: -- These plugins don't work on GHC9 yet diff --git a/cabal-ghc921.project b/cabal-ghc921.project index 011fb55257..71edd79f10 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc921.project @@ -36,7 +36,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:08Z +index-state: 2021-11-29T08:11:09Z constraints: -- These plugins doesn't work on GHC92 yet diff --git a/cabal.project b/cabal.project index 102d9137a8..6cdf417a56 100644 --- a/cabal.project +++ b/cabal.project @@ -40,7 +40,7 @@ package * write-ghc-environment-files: never -index-state: 2021-11-29T08:11:08Z +index-state: 2021-11-29T08:11:09Z constraints: hyphenation +embed From b9af4302e8cf41dd001cc038c126f4dc02bfd4f0 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Mon, 6 Dec 2021 17:30:24 +0200 Subject: [PATCH 54/54] CI: test: fx, don't fail Windows build --- .github/workflows/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db49115902..f9ecf669c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -157,11 +157,8 @@ jobs: - run: cabal v2-update - - run: cabal v2-build - # repeating builds to workaround segfaults in windows and ghc-8.8.4 - - if: runner.os == 'Windows' - name: (Windows) Run build additional 2 times + - name: Build, try x3 times run: cabal v2-build || cabal v2-build - name: Set test options