Skip to content

Commit fde10fa

Browse files
authored
Merge pull request #1173 from jneira/fix-win-cache
Test only last ghc minor version and fix windows cache
2 parents 16aee6e + 8f888c2 commit fde10fa

File tree

5 files changed

+72
-29
lines changed

5 files changed

+72
-29
lines changed

.github/mergify.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,42 @@ pull_request_rules:
66
name: Automatically merge pull requests
77
conditions:
88
- status-success=bench (8.10.2, ubuntu-latest)
9-
- status-success=bench (8.6.5, ubuntu-latest)
109
- status-success=bench (8.8.4, ubuntu-latest)
11-
- status-success=nix (default, macOS-latest)
10+
- status-success=bench (8.6.5, ubuntu-latest)
11+
1212
- status-success=nix (default, ubuntu-latest)
13+
- status-success=nix (default, macOS-latest)
14+
1315
- status-success=test (8.10.3, ubuntu-latest)
14-
- status-success=test (8.10.3, windows-latest)
16+
- status-success=test (8.10.3, macOS-latest)
1517
- status-success=test (8.10.2, ubuntu-latest)
18+
- status-success=test (8.10.2, macOS-latest)
1619
- status-success=test (8.10.1, ubuntu-latest)
20+
- status-success=test (8.10.1, macOS-latest)
1721
- status-success=test (8.8.4, ubuntu-latest)
22+
- status-success=test (8.8.4, macOS-latest)
1823
- status-success=test (8.8.3, ubuntu-latest)
24+
- status-success=test (8.8.3, macOS-latest)
1925
- status-success=test (8.8.2, ubuntu-latest)
26+
- status-success=test (8.8.2, macOS-latest)
2027
- status-success=test (8.6.5, ubuntu-latest)
28+
- status-success=test (8.6.5, macOS-latest)
2129
- status-success=test (8.6.4, ubuntu-latest)
30+
- status-success=test (8.6.4, macOS-latest)
31+
- status-success=test (windows-latest, 8.10.3, true)
32+
- status-success=test (windows-latest, 8.6.5, true)
2233
- status-success=test (windows-latest, 8.10.2.2)
34+
- status-success=test (windows-latest, 8.10.1)
35+
- status-success=test (windows-latest, 8.6.4)
2336

24-
- 'status-success=ci/circleci: ghc-8.10.1'
2537
- 'status-success=ci/circleci: ghc-8.10.3'
26-
- 'status-success=ci/circleci: ghc-8.6.4'
27-
- 'status-success=ci/circleci: ghc-8.8.2'
28-
- 'status-success=ci/circleci: ghc-8.8.3'
2938
- 'status-success=ci/circleci: ghc-8.10.2'
30-
- 'status-success=ci/circleci: ghc-8.6.5'
39+
- 'status-success=ci/circleci: ghc-8.10.1'
3140
- 'status-success=ci/circleci: ghc-8.8.4'
41+
- 'status-success=ci/circleci: ghc-8.8.3'
42+
- 'status-success=ci/circleci: ghc-8.8.2'
43+
- 'status-success=ci/circleci: ghc-8.6.5'
44+
- 'status-success=ci/circleci: ghc-8.6.4'
3245
- 'status-success=ci/circleci: ghc-default'
3346

3447
- label=merge me

.github/workflows/test.yml

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,47 @@
11
name: Testing
22

3+
defaults:
4+
run:
5+
shell: bash
6+
37
on: [pull_request]
48
jobs:
59
test:
610
runs-on: ${{ matrix.os }}
711
strategy:
812
fail-fast: true
913
matrix:
10-
ghc: ['8.10.3', "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, windows-latest]
12-
exclude:
13-
- os: windows-latest
14-
ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
14+
ghc: ["8.10.3", "8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
15+
os: [ubuntu-latest, macOS-latest]
16+
include:
17+
# one ghc-lib build
18+
# should be renabled: #784
19+
# - os: ubuntu-latest
20+
# ghc: '8.10.1'
21+
# ghc-lib: true
22+
# only test supported ghc major versions
23+
- os: ubuntu-latest
24+
ghc: '8.10.3'
25+
test: true
1526
- os: windows-latest
16-
ghc: "8.8.4" # also fails due to segfault :(
27+
ghc: '8.10.3'
28+
test: true
29+
- os: ubuntu-latest
30+
ghc: '8.8.4'
31+
test: true
32+
- os: ubuntu-latest
33+
ghc: '8.6.5'
34+
test: true
1735
- os: windows-latest
18-
ghc: "8.8.3" # fails due to segfault
36+
ghc: '8.6.5'
37+
test: true
38+
# only build rest of supported ghc versions for windows
1939
- os: windows-latest
20-
ghc: "8.8.2" # fails due to error with Cabal
40+
ghc: '8.10.2.2'
2141
- os: windows-latest
22-
ghc: "8.6.4" # times out after 300m
23-
include:
42+
ghc: '8.10.1'
2443
- os: windows-latest
25-
ghc: "8.10.2.2" # only available for windows and choco
44+
ghc: '8.6.4'
2645

2746
steps:
2847
# Cancel queued workflows from earlier commits in this branch
@@ -39,14 +58,26 @@ jobs:
3958
- run: ./fmt.sh
4059
name: "HLint via ./fmt.sh"
4160

61+
- name: Set some window specific things
62+
if: matrix.os == 'windows-latest'
63+
run: |
64+
echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
65+
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
66+
67+
- name: Set some linux/macOS specific things
68+
if: matrix.os != 'windows-latest'
69+
run: |
70+
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
71+
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
72+
4273
- name: Cache Cabal
4374
uses: actions/cache@v2
4475
env:
4576
cache-name: cache-cabal
4677
with:
4778
path: |
48-
~/.cabal/packages
49-
~/.cabal/store
79+
${{ env.CABAL_PKGS_DIR }}
80+
${{ env.CABAL_STORE_DIR }}
5081
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ hashFiles('cabal.project') }}
5182
restore-keys: |
5283
${{ runner.os }}-${{ matrix.ghc }}-bench-${{ hashFiles('cabal.project') }}
@@ -57,7 +88,6 @@ jobs:
5788

5889
# Need this to work around filepath length limits in Windows
5990
- name: Shorten binary names
60-
shell: bash
6191
run: |
6292
sed -i.bak -e 's/haskell-language-server/hls/g' \
6393
-e 's/haskell_language_server/hls/g' \
@@ -66,27 +96,26 @@ jobs:
6696
src/**/*.hs exe/*.hs
6797
6898
- name: Build
69-
shell: bash
7099
# Retry it three times to workaround compiler segfaults in windows
71100
run: cabal build || cabal build || cabal build
72101

73102
- name: Test ghcide
74-
shell: bash
103+
if: ${{ matrix.test }}
75104
# run the tests without parallelism to avoid running out of memory
76105
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"
77106

78107
- name: Test func-test suite
79-
shell: bash
108+
if: ${{ matrix.test }}
80109
env:
81110
HLS_TEST_EXE: hls
82111
HLS_WRAPPER_TEST_EXE: hls-wrapper
83112
# run the tests without parallelism, otherwise tasty will attempt to run
84113
# all functional test cases simultaneously which causes way too many hls
85114
# instances to be spun up for the poor github actions runner to handle
86-
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"
115+
run: 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"
87116

88117
- name: Test wrapper-test suite
89-
shell: bash
118+
if: ${{ matrix.test }}
90119
env:
91120
HLS_TEST_EXE: hls
92121
HLS_WRAPPER_TEST_EXE: hls-wrapper

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ package ghcide
2626

2727
write-ghc-environment-files: never
2828

29-
index-state: 2021-01-03T11:58:44Z
29+
index-state: 2021-01-07T18:06:52Z
3030

3131
allow-newer:
3232
active:base,

ghcide/ghcide.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description:
1313
A library for building Haskell IDE's on top of the GHC API.
1414
homepage: https://github.com/haskell/ghcide#readme
1515
bug-reports: https://github.com/haskell/ghcide/issues
16-
tested-with: GHC>=8.6.5
16+
tested-with: GHC == 8.6.4 || == 8.6.5 || == 8.8.2 || == 8.8.3 || == 8.8.4 || == 8.10.1 || == 8.10.2 || == 8.10.3
1717
extra-source-files: include/ghc-api-version.h README.md CHANGELOG.md
1818
test/data/hover/*.hs
1919
test/data/multi/cabal.project

haskell-language-server.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ copyright: Alan Zimmerman
1414
license: Apache-2.0
1515
license-file: LICENSE
1616
build-type: Simple
17+
tested-with: GHC == 8.6.4 || == 8.6.5 || == 8.8.2 || == 8.8.3 || == 8.8.4 || == 8.10.1 || == 8.10.2 || == 8.10.3
1718
extra-source-files:
1819
README.md
1920
ChangeLog.md

0 commit comments

Comments
 (0)