From d54f9d71a87e151285c2eaf937ab9d4fa8859107 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Mon, 6 Dec 2021 21:40:38 +0200 Subject: [PATCH 1/4] CI: (cache-deps->caching) --- .github/workflows/{cache-deps.yml => caching.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{cache-deps.yml => caching.yml} (100%) diff --git a/.github/workflows/cache-deps.yml b/.github/workflows/caching.yml similarity index 100% rename from .github/workflows/cache-deps.yml rename to .github/workflows/caching.yml From c8e3b4d71d9c2e3aff5be1f442c1a427ec6a538b Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Mon, 6 Dec 2021 22:06:10 +0200 Subject: [PATCH 2/4] CI: caching: add doc --- .github/workflows/caching.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 98935839c9..e1bb01a50c 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -1,6 +1,8 @@ -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 +# Docs on the workflow: +# 1. GitHub cache scoping goes: main branch -> PR main branch -> PR. (essentially in a tree fashion). That is why it is useful to build caches on `master` - to generate & keep the main project state & they would be shared to the whole tree. +# 2. GitHub has a 10G default limit of cache pool per repo. HLS is a big project & monorepo of many projects, so to keep cache useful - the main branch state caches should be preserved & their storage preferred to the PRs, since PRs from internal branches - would count into 10G pool, but would be available only inside of the PR scope, which can bork cache fore the whole community. That is short story why `dist-newstyle` (especially full) - is not includded into `master` cache. defaults: run: From b83bed99dcc789b09714ccbb0703c496413aa70e Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Mon, 6 Dec 2021 22:30:44 +0200 Subject: [PATCH 3/4] CI: rm 8.10.5 Since next HLS release is no longer supports this version. --- .github/workflows/build.yml | 8 +------- .github/workflows/caching.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/caching.yml b/.github/workflows/caching.yml index e1bb01a50c..0e85605c6e 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -46,7 +46,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: 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 @@ -73,12 +73,6 @@ jobs: 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' - 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 086fc7d0e4..a74d8f1f1e 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: 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' - 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 076528b1e0ed0eea0318f4ef213734d450ba4c03 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Mon, 6 Dec 2021 23:02:29 +0200 Subject: [PATCH 4/4] CI: update to currently recommended Cabal version --- .github/workflows/bench.yml | 9 +++++---- .github/workflows/build.yml | 5 +++-- .github/workflows/caching.yml | 11 +++++++++-- .github/workflows/hackage.yml | 5 +++-- .github/workflows/test.yml | 5 +++-- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ef6e44885e..e553343444 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -32,6 +32,7 @@ jobs: matrix: ghc: ['8.10.7'] os: [ubuntu-latest] + cabal: ['3.6'] steps: - uses: actions/checkout@v2 @@ -40,8 +41,8 @@ jobs: - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: '3.2' + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} enable-stack: false - name: Cache Cabal @@ -109,8 +110,8 @@ jobs: steps: - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: '3.2' + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} enable-stack: false - name: Download cabal home diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7c50e23e6..04417533c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: matrix: 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] + cabal: ['3.6'] exclude: - os: windows-latest ghc: '8.8.3' # fails due to segfault @@ -30,8 +31,8 @@ jobs: submodules: true - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: '3.4' + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} - name: Use modified cabal.project for ghc9 if: ${{ matrix.ghc == '9.0.1' }} diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 0e85605c6e..a6ac50b477 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -48,6 +48,7 @@ jobs: matrix: 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] + cabal: ['3.6'] exclude: - os: windows-latest ghc: '8.8.3' @@ -58,8 +59,8 @@ jobs: submodules: true - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: "3.4" + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} - if: matrix.os == 'windows-latest' name: Set some window specific things @@ -73,6 +74,12 @@ jobs: 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' + 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/hackage.yml b/.github/workflows/hackage.yml index a5c143dd78..b3ffd7652c 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" @@ -51,8 +52,8 @@ jobs: - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: '3.4' + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} - name: Cache Cabal uses: actions/cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a74d8f1f1e..17180f0fc0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: matrix: ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"] os: [ubuntu-latest, macOS-latest] + cabal: ['3.6'] include: # only test supported ghc major versions - os: ubuntu-latest @@ -77,8 +78,8 @@ jobs: submodules: true - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: "3.4" + ghc-version : ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} - run: ./fmt.sh name: "HLint via ./fmt.sh"