Skip to content

Commit aa7e9a3

Browse files
authored
Ci fixes (#783)
* Drop macOS benchmarks * Drop macOS tests * Really exclude Windows 8.6.4 It occasionally becomes much slower than the others and times out after 6h https://github.com/haskell/haskell-language-server/runs/1626173853?check_suite_focus=true * switch to haskell/actions/setup actions/setup-haskell has been archived, haskell/actions/setup is the replacement * use coarser cache keys We are getting very few cache hits because we have too many caches and are running over the 5GB per repository limit. Each node in the matrix weighs around 350MB, so we can have up to 15 nodes. The current matrix (after dropping macOS but before adding 8.10.3) has 12 nodes. The `**/*.cabal` hash is wrong, since it also captures cabal files in tests The `**/cabal.project` is wrong for the same reason, but it can be easily fixed. * Use more precise .cabal paths in test cache * Reuse build cache in bench workflows and viceversa * Reduce Nix builds to the bare minimum We simply need to check that the Nix derivation works * remove enable-stack * Auto cancel redundant workflows * Enable tests fail-fast * Remove ghc-lib from matrix Created #784 to restore it
1 parent 901974b commit aa7e9a3

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

Diff for: .github/workflows/bench.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
ghc: ['8.10.2', '8.8.4', '8.6.5']
12-
os: [ubuntu-latest, macOS-latest]
12+
os: [ubuntu-latest]
1313

1414
steps:
1515
- uses: actions/checkout@v2
1616
- run: git fetch origin master # check the master branch for benchmarking
17-
- uses: actions/setup-haskell@v1
17+
- uses: haskell/actions/setup@v1
1818
with:
1919
ghc-version: ${{ matrix.ghc }}
2020
cabal-version: '3.2'
@@ -26,7 +26,11 @@ jobs:
2626
path: |
2727
~/.cabal/packages
2828
~/.cabal/store
29-
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-bench
29+
key: ${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }}
30+
restore-keys: |
31+
${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
32+
${{ runner.os }}-${{ matrix.ghc }}-bench-
33+
${{ runner.os }}-${{ matrix.ghc }}
3034
3135
- run: cabal update
3236

Diff for: .github/workflows/build.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v2
3636
with:
3737
submodules: true
38-
- uses: actions/setup-haskell@v1
38+
- uses: haskell/actions/setup@v1
3939
with:
4040
ghc-version: ${{ matrix.ghc }}
4141
cabal-version: '3.2'
@@ -174,4 +174,3 @@ jobs:
174174
asset_path: bin/haskell-language-server.tar.gz
175175
asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
176176
asset_content_type: application/gzip
177-

Diff for: .github/workflows/nix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
ghc: ['default', 'ghc8102', 'ghc884', 'ghc865']
11+
ghc: ['default']
1212
os: [ubuntu-latest, macOS-latest]
1313

1414
steps:

Diff for: .github/workflows/test.yml

+12-16
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ jobs:
55
test:
66
runs-on: ${{ matrix.os }}
77
strategy:
8-
fail-fast: false
8+
fail-fast: true
99
matrix:
1010
ghc: ["8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
11-
os: [ubuntu-latest, macOS-latest, windows-latest]
12-
ghc-lib: [false]
11+
os: [ubuntu-latest, windows-latest]
1312
exclude:
1413
- os: windows-latest
1514
ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
@@ -19,25 +18,23 @@ jobs:
1918
ghc: "8.8.3" # fails due to segfault
2019
- os: windows-latest
2120
ghc: "8.8.2" # fails due to error with Cabal
22-
include:
2321
- os: windows-latest
2422
ghc: "8.6.4" # times out after 300m
23+
include:
2524
- os: windows-latest
2625
ghc: "8.10.2.2" # only available for windows and choco
27-
# one ghc-lib build
28-
- os: ubuntu-latest
29-
ghc: '8.10.1'
30-
ghc-lib: true
3126

3227
steps:
28+
# Cancel queued workflows from earlier commits in this branch
29+
- uses: fkirc/skip-duplicate-actions@master
30+
3331
- uses: actions/checkout@v2
3432
with:
3533
submodules: true
36-
- uses: actions/setup-haskell@v1
34+
- uses: haskell/actions/setup@v1
3735
with:
3836
ghc-version: ${{ matrix.ghc }}
3937
cabal-version: "3.2"
40-
enable-stack: true
4138

4239
- run: ./fmt.sh
4340
name: "HLint via ./fmt.sh"
@@ -47,10 +44,12 @@ jobs:
4744
env:
4845
cache-name: cache-cabal
4946
with:
50-
path: ~/.cabal/
51-
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
47+
path: |
48+
~/.cabal/packages
49+
~/.cabal/store
50+
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
5251
restore-keys: |
53-
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
52+
${{ runner.os }}-${{ matrix.ghc }}-bench-$${ hashFiles('cabal.project') }}
5453
${{ runner.os }}-${{ matrix.ghc }}-build-
5554
${{ runner.os }}-${{ matrix.ghc }}
5655
@@ -72,13 +71,11 @@ jobs:
7271
run: cabal build || cabal build || cabal build
7372

7473
- name: Test ghcide
75-
if: ${{ !matrix.ghc-lib }}
7674
shell: bash
7775
# run the tests without parallelism to avoid running out of memory
7876
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"
7977

8078
- name: Test func-test suite
81-
if: ${{ !matrix.ghc-lib }}
8279
shell: bash
8380
env:
8481
HLS_TEST_EXE: hls
@@ -89,7 +86,6 @@ jobs:
8986
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"
9087

9188
- name: Test wrapper-test suite
92-
if: ${{ !matrix.ghc-lib }}
9389
shell: bash
9490
env:
9591
HLS_TEST_EXE: hls

0 commit comments

Comments
 (0)