@@ -20,24 +20,19 @@ jobs:
20
20
runs-on : ubuntu-latest
21
21
# This job is not run in a container, any recent GHC should be fine
22
22
steps :
23
- - name : Set PATH
24
- # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
25
- run : |
26
- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
27
- - uses : actions/cache@v3
23
+ - uses : actions/cache@v4
28
24
with :
29
- path : ~/.cabal/store
25
+ path : ~/.local/state/cabal
30
26
key : linux-store-meta
31
27
# See https://github.com/haskell/cabal/pull/8739
32
28
- name : Sudo chmod to permit ghcup to update its cache
29
+ if : runner.os == 'Linux'
33
30
run : |
34
- if [[ "${{ runner.os }}" == "Linux" ]]; then
35
31
sudo ls -lah /usr/local/.ghcup/cache
36
32
sudo mkdir -p /usr/local/.ghcup/cache
37
33
sudo ls -lah /usr/local/.ghcup/cache
38
- sudo chown -R $ USER /usr/local/.ghcup
34
+ sudo chown -R "${ USER}" /usr/local/.ghcup
39
35
sudo chmod -R 777 /usr/local/.ghcup
40
- fi
41
36
- name : ghcup
42
37
run : |
43
38
ghcup --version
47
42
- name : Update Hackage index
48
43
run : cabal v2-update
49
44
- name : Install alex
50
- run : cabal v2-install alex --constraint='alex ==3.2.7.3'
45
+ run : cabal v2-install alex --constraint='alex >=3.2.7.3'
46
+ - run : alex --version
51
47
- uses : actions/checkout@v4
52
48
- name : Regenerate files
53
49
run : |
@@ -62,23 +58,19 @@ jobs:
62
58
name : Doctest Cabal
63
59
runs-on : ubuntu-latest
64
60
steps :
65
- - name : Set PATH
66
- run : |
67
- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
68
- - uses : actions/cache@v3
61
+ - uses : actions/cache@v4
69
62
with :
70
- path : ~/.cabal/store
63
+ path : ~/.local/state/cabal
71
64
key : linux-store-doctest
72
65
# See https://github.com/haskell/cabal/pull/8739
73
66
- name : Sudo chmod to permit ghcup to update its cache
67
+ if : runner.os == 'Linux'
74
68
run : |
75
- if [[ "${{ runner.os }}" == "Linux" ]]; then
76
69
sudo ls -lah /usr/local/.ghcup/cache
77
70
sudo mkdir -p /usr/local/.ghcup/cache
78
71
sudo ls -lah /usr/local/.ghcup/cache
79
- sudo chown -R $ USER /usr/local/.ghcup
72
+ sudo chown -R "${ USER}" /usr/local/.ghcup
80
73
sudo chmod -R 777 /usr/local/.ghcup
81
- fi
82
74
- name : ghcup
83
75
run : |
84
76
ghcup --version
@@ -96,23 +88,19 @@ jobs:
96
88
name : Check Field Syntax Reference
97
89
runs-on : ubuntu-latest
98
90
steps :
99
- - name : Set PATH
100
- run : |
101
- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
102
- - uses : actions/cache@v3
91
+ - uses : actions/cache@v4
103
92
with :
104
- path : ~/.cabal/store
93
+ path : ~/.local/state/cabal
105
94
key : linux-store-buildinfo-doc-diff
106
95
# See https://github.com/haskell/cabal/pull/8739
107
96
- name : Sudo chmod to permit ghcup to update its cache
97
+ if : runner.os == 'Linux'
108
98
run : |
109
- if [[ "${{ runner.os }}" == "Linux" ]]; then
110
99
sudo ls -lah /usr/local/.ghcup/cache
111
100
sudo mkdir -p /usr/local/.ghcup/cache
112
101
sudo ls -lah /usr/local/.ghcup/cache
113
- sudo chown -R $ USER /usr/local/.ghcup
102
+ sudo chown -R "${ USER}" /usr/local/.ghcup
114
103
sudo chmod -R 777 /usr/local/.ghcup
115
- fi
116
104
- name : ghcup
117
105
run : |
118
106
ghcup --version
@@ -128,9 +116,6 @@ jobs:
128
116
name : Check Release Project
129
117
runs-on : ubuntu-latest
130
118
steps :
131
- - name : Set PATH
132
- run : |
133
- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
134
119
- name : ghcup
135
120
run : |
136
121
ghcup --version
@@ -144,4 +129,3 @@ jobs:
144
129
run : cabal build all --dry-run --project-file=cabal.project.release
145
130
- name : Check Release with Latest Hackage
146
131
run : cabal build all --dry-run --project-file=cabal.project.release --index-state="hackage.haskell.org HEAD"
147
-
0 commit comments