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 e3d9d6824a..04417533c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,9 @@ 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] + 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' }} @@ -68,12 +69,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/caching.yml similarity index 81% rename from .github/workflows/cache-deps.yml rename to .github/workflows/caching.yml index 98935839c9..a6ac50b477 100644 --- a/.github/workflows/cache-deps.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: @@ -44,8 +46,9 @@ 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] + cabal: ['3.6'] exclude: - os: windows-latest ghc: '8.8.3' @@ -56,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 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 086fc7d0e4..17180f0fc0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,9 @@ 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] + cabal: ['3.6'] include: # only test supported ghc major versions - os: ubuntu-latest @@ -68,8 +69,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' @@ -79,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" @@ -97,12 +96,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