diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 0d96787935..51f28525ab 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -9,12 +9,12 @@ jobs: fail-fast: false matrix: ghc: ['8.10.2', '8.8.4', '8.6.5'] - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v2 - run: git fetch origin master # check the master branch for benchmarking - - uses: actions/setup-haskell@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' @@ -26,7 +26,11 @@ jobs: path: | ~/.cabal/packages ~/.cabal/store - key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-bench + key: ${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} + ${{ runner.os }}-${{ matrix.ghc }}-bench- + ${{ runner.os }}-${{ matrix.ghc }} - run: cabal update diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2363e27a12..a00a34efe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - uses: actions/setup-haskell@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' @@ -174,4 +174,3 @@ jobs: asset_path: bin/haskell-language-server.tar.gz asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz asset_content_type: application/gzip - diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 218983cb7c..13983572b2 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['default', 'ghc8102', 'ghc884', 'ghc865'] + ghc: ['default'] os: [ubuntu-latest, macOS-latest] steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d15b81b057..54c41739a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,11 +5,10 @@ jobs: test: runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: ghc: ["8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"] - os: [ubuntu-latest, macOS-latest, windows-latest] - ghc-lib: [false] + os: [ubuntu-latest, windows-latest] exclude: - os: windows-latest ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550 @@ -19,25 +18,23 @@ jobs: ghc: "8.8.3" # fails due to segfault - os: windows-latest ghc: "8.8.2" # fails due to error with Cabal - include: - os: windows-latest ghc: "8.6.4" # times out after 300m + include: - os: windows-latest ghc: "8.10.2.2" # only available for windows and choco - # one ghc-lib build - - os: ubuntu-latest - ghc: '8.10.1' - ghc-lib: true steps: + # Cancel queued workflows from earlier commits in this branch + - uses: fkirc/skip-duplicate-actions@master + - uses: actions/checkout@v2 with: submodules: true - - uses: actions/setup-haskell@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: "3.2" - enable-stack: true - run: ./fmt.sh name: "HLint via ./fmt.sh" @@ -47,10 +44,12 @@ jobs: env: cache-name: cache-cabal with: - path: ~/.cabal/ - key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + path: | + ~/.cabal/packages + ~/.cabal/store + key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }} restore-keys: | - ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.ghc }}-bench-$${ hashFiles('cabal.project') }} ${{ runner.os }}-${{ matrix.ghc }}-build- ${{ runner.os }}-${{ matrix.ghc }} @@ -72,13 +71,11 @@ jobs: run: cabal build || cabal build || cabal build - name: Test ghcide - if: ${{ !matrix.ghc-lib }} shell: bash # run the tests without parallelism to avoid running out of memory run: cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun" - name: Test func-test suite - if: ${{ !matrix.ghc-lib }} shell: bash env: HLS_TEST_EXE: hls @@ -89,7 +86,6 @@ jobs: run: cabal test func-test --test-options="-j1 --rerun-update" || cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun" - name: Test wrapper-test suite - if: ${{ !matrix.ghc-lib }} shell: bash env: HLS_TEST_EXE: hls